/// <summary> /// Determines whether a data model can be created for the specified <see cref="ViewModel<TController, TModel>"/>. /// </summary> /// <param name="viewModel">The view model.</param> /// <returns> /// <c>true</c> if a data model can be created; otherwise, <c>false</c>. /// </returns> public static bool CanCreate(ViewModel <TController, TModel> viewModel) { return(viewModel.CanCreate); }
/// <summary> /// Initializes a new instance of the <see cref="CreateCommand<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> /// <param name="owner">The owner window.</param> public CreateCommand(ViewModel <TController, TModel> viewModel, Window owner) : base(viewModel) { this.owner = owner; }
/// <summary> /// Initializes a new instance of the <see cref="CreateCommand<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public CreateCommand(ViewModel <TController, TModel> viewModel) : this(viewModel, null) { }
/// <summary> /// Initializes a new instance of the <see cref="NewCommandBinding<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public NewCommandBinding(ViewModel <TController, TModel> viewModel) : this(viewModel, null) { }
internal static void Execute(ViewModel <TController, TModel> viewModel, Window owner, object parameter) { CreateCommand <TController, TModel> .Create(viewModel); }
internal static bool CanExecute(ViewModel <TController, TModel> viewModel, object parameter) { return(CreateCommand <TController, TModel> .CanCreate(viewModel)); }