1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <Window x:Class="EapClientSimulator.FrmSequence"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:EapClientSimulator"
- mc:Ignorable="d"
- Title="FrmSequence" Height="650" Width="500" Loaded="Window_Loaded" WindowStyle="None" WindowStartupLocation="CenterScreen">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="60"></RowDefinition>
- </Grid.RowDefinitions>
- <DataGrid Grid.Row="0" AutoGenerateColumns="False" Margin="5"
- Background="White" ItemsSource="{Binding NotifiableSequenceList, Mode=OneWay}"
- SelectionMode="Single" SelectionUnit="FullRow"
- FontFamily="Arial,SimSun" FontSize="13"
- BorderThickness="0.1"
- CanUserDeleteRows="False" CanUserAddRows="False" IsReadOnly="True" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False">
- <DataGrid.Columns>
- <DataGridTextColumn Header="Index" Width="50" CanUserSort="True" IsReadOnly="True" Binding="{Binding Index,Mode=OneWay}">
- </DataGridTextColumn>
- <DataGridTemplateColumn Header="Name" Width="250" CanUserSort="True">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="12"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Command" Width="90" CanUserSort="False" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="Clear" FontSize="12" Command="{Binding RelativeSource={RelativeSource FindAncestor,
- AncestorType={x:Type DataGrid}}, Path=DataContext.SetClearCommand}" CommandParameter="{Binding Index}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <Button Grid.Row="1" Name="btnClear" Content="Clear All" Height="30" Click="btnClear_Click" Margin="14,15,396,15"></Button>
- <Button Grid.Row="1" Name="btnSetAll" Content="Set All" Height="30" Click="btnSetAll_Click" Margin="119,15,291,15"></Button>
- <Button Grid.Row="1" Name="btnConfirm" Content="Confirm" Height="30" Click="btnConfirm_Click" Margin="240,15,150,15"></Button>
- <Button Grid.Row="1" Name="btnClose" Content="Close" Height="30" Click="btnClose_Click" Margin="380,15,20,15"></Button>
- </Grid>
- </Window>
|