Good afternoon! I have the following view code (part):
<dxg:TreeListControl x:Name="TlcPropertyGroups" ItemsSource="{Binding CatalogPropertyGroups}" >
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Name" />
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView x:Name="TlvPropertyGroups" ShowCheckboxes="True" AllowRecursiveNodeChecking="True" ShowColumnHeaders="True" TreeDerivationMode="ChildNodesSelector" ChildNodesPath="CatalogPropertyGroupDetails" ShowIndicator="False">
<dxg:TreeListView.HeaderTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<dxe:TextEdit EditMode="InplaceInactive" Text="Группы свойств"/>
<dxe:HyperlinkEdit Grid.Column="1" Text="Настроить" HorizontalAlignment="Right" Command="{Binding SettingCatalogPropertyGroupsCommand}" DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dx:DXWindow}}}"/>
</Grid>
</DataTemplate>
</dxg:TreeListView.HeaderTemplate>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding CmdTreeListViewLoaded}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</dxg:TreeListView>
</dxg:TreeListControl.View>
</dxg:TreeListControl>
There is the following command:
private RelayCommand cmdTreeListViewLoaded;
public RelayCommand CmdTreeListViewLoaded
{
get { return cmdTreeListViewLoaded ?? (cmdTreeListViewLoaded = new RelayCommand(obj =>
{
//some code
})); }
}
Question: how do I pass a delegate as a parameter to the command (to hide some presentation-level logic)? P.S.: as an example, a delegate might display a simple MessageBox.