12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <UserControl x:Class="Aitex.Core.UI.View.Common.ParameterView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- mc:Ignorable="d"
- d:DesignHeight="1024" d:DesignWidth="768">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="290" />
- <ColumnDefinition Width="900*" />
- </Grid.ColumnDefinitions>
- <TreeView Grid.Row="0" Grid.Column="0" Margin="4,4,0,0" Name="treeView1" Style="{StaticResource ConfigTreeView}" />
- <Grid Grid.Row="0" Grid.Column="1">
- <DataGrid x:Name="dataGrid1" Margin="5,30,5,0" ItemsSource="{Binding}"
- AutoGenerateColumns="False"
- BorderThickness="0.1"
- CanUserAddRows="False"
- CanUserDeleteRows="False"
- CanUserReorderColumns="False"
- CanUserResizeColumns="True"
- CanUserResizeRows="False"
- CanUserSortColumns="False"
- SelectionMode="Single"
- SelectionUnit="FullRow"
- Background="#05000000"
- VerticalScrollBarVisibility="Auto"
- HorizontalScrollBarVisibility="Disabled"
- FontSize="12" MinRowHeight="20"
- VerticalAlignment="Stretch"
- FontFamily="Arial,SimSun">
- <DataGrid.RowValidationRules>
- <DataErrorValidationRule ValidationStep="UpdatedValue"/>
- </DataGrid.RowValidationRules>
- <DataGrid.Columns>
- <DataGridTextColumn Width="275*" Binding="{Binding EntryName}" Header="名称" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="200*" Binding="{Binding Description}" Header="描述" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="55" Binding="{Binding Type}" Header="类型" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="50" Binding="{Binding Unit}" Header="单位" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="70" Binding="{Binding RangeLowLimit}" Header="最小值" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="70" Binding="{Binding RangeUpLimit}" Header="最大值" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="70" Binding="{Binding Default}" Header="默认值" CanUserSort="False" CanUserReorder="False" IsReadOnly="True" />
- <DataGridTextColumn Width="105" Binding="{Binding Value, Mode=TwoWay}" Header="设定值" CanUserSort="False" CanUserReorder="False" IsReadOnly="False" >
- <DataGridTextColumn.EditingElementStyle>
- <Style TargetType="{x:Type TextBox}">
- <EventSetter Event="LostFocus" Handler="GridEditor_LostFocus" />
- <EventSetter Event="GotFocus" Handler="GridEditor_GotFocus" />
- </Style>
- </DataGridTextColumn.EditingElementStyle>
- </DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- <Button Content="保存参数" Height="23" HorizontalAlignment="Right" Margin="0,4,108,0" Name="btnSaveParam" Click="btnSaveParam_Click" VerticalAlignment="Top" Width="75" FontSize="13" FontFamily="Arial,SimSun" />
- <Button Content="重新获取" Height="23" HorizontalAlignment="Right" Margin="0,4,13,0" Name="btnResetParam" Click="btnResetParam_Click" VerticalAlignment="Top" Width="75" FontSize="13" FontFamily="Arial,SimSun" />
- <Label Content="参数设置 " Height="40" HorizontalAlignment="Left" Name="labelTile" VerticalAlignment="Top" Width="525" FontSize="13" Margin="1,4,0,0" FontFamily="Arial,SimSun" />
- </Grid>
- </Grid>
- </UserControl>
|