<DataGrid Name="dgObstructionsBottom" CanUserAddRows="True" ItemsSource="{Binding ObstructionBottom}" Height="419" AutoGenerateColumns="False" CurrentCell="{Binding ObstructionBottomSelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding start, UpdateSourceTrigger=PropertyChanged}" Header="x1" Width="*" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}" /> <DataGridTextColumn Binding="{Binding end, UpdateSourceTrigger=PropertyChanged}" Header="x2" Width="*" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"/> </DataGrid.Columns> <i:Interaction.Triggers> <i:EventTrigger EventName="BeginningEdit"> <i:InvokeCommandAction Command="{Binding BeginningEditCommand}" CommandParameter="Bot" /> </i:EventTrigger> <i:EventTrigger EventName="CellEditEnding"> <i:InvokeCommandAction Command="{Binding ObstructionBottomChangeCommand}" /> </i:EventTrigger> <i:EventTrigger EventName="AddingNewItem"> <i:InvokeCommandAction Command="{Binding AddingNewItemCommand}"/> </i:EventTrigger> </i:Interaction.Triggers> <DataGrid.InputBindings> <KeyBinding Key="Delete" Command="{Binding ObstructionBottomRemoveCommand}"/> </DataGrid.InputBindings> </DataGrid>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)