87 lines
3.4 KiB
XML
87 lines
3.4 KiB
XML
<UserControl
|
|
x:Class="CapMachine.Wpf.Views.DialogYAxisConfigView"
|
|
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
Width="800"
|
|
Height="700"
|
|
mc:Ignorable="d">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding AddCmd}"
|
|
Content="新增"
|
|
FontWeight="Bold"
|
|
Foreground="CadetBlue"
|
|
Style="{StaticResource MaterialDesignFlatAccentBgButton}" />
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding DeleteCmd}"
|
|
Content="删除"
|
|
FontWeight="Bold"
|
|
Foreground="CadetBlue"
|
|
Style="{StaticResource MaterialDesignFlatAccentBgButton}" />
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1">
|
|
<DataGrid
|
|
x:Name="MainDatagrid"
|
|
Margin="5"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
HeadersVisibility="Column"
|
|
ItemsSource="{Binding ChartYAxisDtoItems}"
|
|
SelectionMode="Extended"
|
|
SelectionUnit="FullRow">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Binding="{Binding Index}"
|
|
Header="序号"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Name}"
|
|
Header="名称" />
|
|
<DataGridTextColumn Binding="{Binding Min}" Header="最小值" />
|
|
<DataGridTextColumn Binding="{Binding Max}" Header="最大值" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Unit}"
|
|
Header="单位" />
|
|
</DataGrid.Columns>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=MainDatagrid, Path=SelectedItem}" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</DataGrid>
|
|
</Grid>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="10,10"
|
|
Command="{Binding SaveCmd}"
|
|
Content="确定"
|
|
Foreground="White" />
|
|
<Button
|
|
Margin="10,10"
|
|
Command="{Binding CancelCmd}"
|
|
Content="取消"
|
|
Foreground="White" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|