<Button HorizontalAlignment="Right" Margin="5,0,0,0" Height="23" Content="Enable/Disable"> <Button.Style> <Style TargetType="Button"> <Setter Property="IsEnabled" Value="False" /> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=SelectItems, Path=IsChecked}" Value="True"> <Setter Property="IsEnabled" Value="True" /> </DataTrigger> </Style.Triggers> </Style> </Button.Style> </Button>
<DataGrid ScrollViewer.HorizontalScrollBarVisibility="Auto" BorderBrush="Black" Grid.Row="2" VerticalAlignment="Stretch" ItemsSource="{Binding ListOfItems}" CanUserAddRows="False" IsReadOnly="True" CanUserDeleteRows="False" CanUserResizeColumns="False" HorizontalGridLinesBrush="Black" VerticalGridLinesBrush="Black"> <DataGrid.Resources> <Style TargetType="DataGridColumnHeader"> <Setter Property="Width" Value="95" /> </Style> </DataGrid.Resources> <DataGrid.Columns> <DataGridTemplateColumn Width="25"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <RadioButton x:Name="SelectItems" HorizontalAlignment="Center" GroupName="Trail"/> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)