<ControlTemplate x:Key="gridTemplate"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition Height="25"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <dxb:BarManager Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Name="barmanager1" VerticalAlignment="Stretch" > <dxb:BarManager.Items> <dxb:BarButtonItem Name="Add1" Content="Add" CommandParameter="Add" Command="{Binding ParamGroupGeneralCommand}" /> <!--<dxb:BarButtonItem Name="Delete1" Content="Delete" Command="{Binding ParamGroupGeneralCommand}" CommandParameter ="Delete" />--> <dxb:BarButtonItem Name="Delete1" Content="Delete" Command="{Binding ParamGroupDelGeneralCommand}" CommandParameter ="{Binding Path=View.FocusedRow, ElementName=PART_GridControl}" /> </dxb:BarManager.Items> <dxg:GridControl Name="PART_GridControl" ItemsSource="{Binding ParameterInfo}" AutoPopulateColumns="False" Height="250" > <dxg:GridControl.Columns> <dxg:GridColumn FieldName="Id" Header="Id" Visible="True"/> <dxg:GridColumn FieldName="GroupName" Header="Group Name"/> <dxg:GridColumn FieldName="GroupDescription" Header="Description"/> </dxg:GridControl.Columns> <dxg:GridControl.View> <dxg:TableView Name="view" AutoWidth="True" ShowGroupPanel="False" VerticalScrollbarVisibility="Visible" > <dxg:TableView.RowCellMenuCustomizations> <dxb:BarButtonItemLink BarItemName="Add1"/> <dxb:BarButtonItemLink BarItemName="Delete1"/> </dxg:TableView.RowCellMenuCustomizations> </dxg:TableView> </dxg:GridControl.View> </dxg:GridControl> </dxb:BarManager> <Button Grid.Row="1" Grid.Column="0" Content="Save" Height="25" Width="50" HorizontalAlignment="Right" CommandParameter="SaveParamGroup" Command="{Binding ParamGroupGeneralCommand}" Name="SaveButton" ></Button> <Button Grid.Row="1" Grid.Column="1" Content="Close" Height="25" Width="50" HorizontalAlignment="Left" Command="{Binding ParamGroupCloseGeneralCommand}" CommandParameter ="{Binding Path=View.FocusedRow, ElementName=PART_GridControl}"></Button> </Grid> </ControlTemplate>
FrameworkElement.GetTemplateChild
OnApplyTemplate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)