Back to Devexpress

DialogEditFormBehavior.CreateEditItemViewModelCommand Property

wpf-devexpress-dot-xpf-dot-grid-dot-dialogeditformbehavior-5a6413e6.md

latest3.5 KB
Original Source

DialogEditFormBehavior.CreateEditItemViewModelCommand Property

Gets or sets a command that specifies a View Model for the edit operation. The behavior executes this command before the edit form dialog appears.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Extensions.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ICommand<CreateEditItemViewModelArgs> CreateEditItemViewModelCommand { get; set; }
vb
Public Property CreateEditItemViewModelCommand As ICommand(Of CreateEditItemViewModelArgs)

Property Value

TypeDescription
ICommand<CreateEditItemViewModelArgs>

A command that specifies a View Model for the edit operation.

|

Remarks

When a user invokes the edit form dialog, the behavior raises the CreateEditItemViewModel event and executes the CreateEditItemViewModelCommand.

Refer to the following help topic for more information: DialogEditFormBehavior.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateEditItemViewModelCommand property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-implement-crud-operations/CS/ViewModel/EFCore/InstantFeedbackMode/MainWindow.xaml#L51

xml
<dxg:DialogEditFormBehavior x:Name="EditFormBehavior" KeyProperty="Id"
                            CreateEditItemViewModelCommand="{Binding CreateEditEntityViewModelCommand}" ValidateRowCommand="{Binding ValidateRowCommand}"
                            ValidateRowDeletionCommand="{Binding ValidateRowDeletionCommand}">

wpf-data-grid-extend-crud-operations/CS/DetailCollectionEditing/MainWindow.xaml#L36

xml
<dxmvvm:Interaction.Behaviors>
    <dxg:DialogEditFormBehavior x:Name="EditFormBehavior" KeyProperty="Id" CreateEditItemViewModelCommand="{Binding CreateEditEntityViewModelCommand}" ValidateRowCommand="{Binding ValidateRowCommand}" ValidateRowDeletionCommand="{Binding ValidateRowDeletionCommand}">
        <dxg:DialogEditFormBehavior.EditTemplate>

See Also

DialogEditFormBehavior Class

DialogEditFormBehavior Members

DevExpress.Xpf.Grid Namespace