FrmSequence.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <Window x:Class="EapClientSimulator.FrmSequence"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:EapClientSimulator"
  7. mc:Ignorable="d"
  8. Title="FrmSequence" Height="650" Width="500" Loaded="Window_Loaded" WindowStyle="None" WindowStartupLocation="CenterScreen">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"></RowDefinition>
  12. <RowDefinition Height="60"></RowDefinition>
  13. </Grid.RowDefinitions>
  14. <DataGrid Grid.Row="0" AutoGenerateColumns="False" Margin="5"
  15. Background="White" ItemsSource="{Binding NotifiableSequenceList, Mode=OneWay}"
  16. SelectionMode="Single" SelectionUnit="FullRow"
  17. FontFamily="Arial,SimSun" FontSize="13"
  18. BorderThickness="0.1"
  19. CanUserDeleteRows="False" CanUserAddRows="False" IsReadOnly="True" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False">
  20. <DataGrid.Columns>
  21. <DataGridTextColumn Header="Index" Width="50" CanUserSort="True" IsReadOnly="True" Binding="{Binding Index,Mode=OneWay}">
  22. </DataGridTextColumn>
  23. <DataGridTemplateColumn Header="Name" Width="250" CanUserSort="True">
  24. <DataGridTemplateColumn.CellTemplate>
  25. <DataTemplate>
  26. <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="12"/>
  27. </DataTemplate>
  28. </DataGridTemplateColumn.CellTemplate>
  29. </DataGridTemplateColumn>
  30. <DataGridTemplateColumn Header="Command" Width="90" CanUserSort="False" >
  31. <DataGridTemplateColumn.CellTemplate>
  32. <DataTemplate>
  33. <Button Content="Clear" FontSize="12" Command="{Binding RelativeSource={RelativeSource FindAncestor,
  34. AncestorType={x:Type DataGrid}}, Path=DataContext.SetClearCommand}" CommandParameter="{Binding Index}"/>
  35. </DataTemplate>
  36. </DataGridTemplateColumn.CellTemplate>
  37. </DataGridTemplateColumn>
  38. </DataGrid.Columns>
  39. </DataGrid>
  40. <Button Grid.Row="1" Name="btnClear" Content="Clear All" Height="30" Click="btnClear_Click" Margin="14,15,396,15"></Button>
  41. <Button Grid.Row="1" Name="btnSetAll" Content="Set All" Height="30" Click="btnSetAll_Click" Margin="119,15,291,15"></Button>
  42. <Button Grid.Row="1" Name="btnConfirm" Content="Confirm" Height="30" Click="btnConfirm_Click" Margin="240,15,150,15"></Button>
  43. <Button Grid.Row="1" Name="btnClose" Content="Close" Height="30" Click="btnClose_Click" Margin="380,15,20,15"></Button>
  44. </Grid>
  45. </Window>