68 lines
3.5 KiB
Plaintext
68 lines
3.5 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.Civil.DesignUtils.RoomSettingsWin"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:civil="clr-namespace:Szmedi.RvKits.Civil"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
Title="房间设置"
|
||
|
|
Width="800"
|
||
|
|
Height="450"
|
||
|
|
d:DataContext="{d:DesignInstance civil:RoomSettingViewModel}"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<i:Interaction.Triggers>
|
||
|
|
<i:EventTrigger EventName="Closing">
|
||
|
|
<i:InvokeCommandAction Command="{Binding SaveInputValues}" />
|
||
|
|
</i:EventTrigger>
|
||
|
|
</i:Interaction.Triggers>
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition />
|
||
|
|
<RowDefinition Height="0.2*" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<!--<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition />
|
||
|
|
<ColumnDefinition />
|
||
|
|
</Grid.ColumnDefinitions>-->
|
||
|
|
<DataGrid
|
||
|
|
x:Name="DgRoomData"
|
||
|
|
Margin="5"
|
||
|
|
AutoGenerateColumns="False"
|
||
|
|
CanUserAddRows="False"
|
||
|
|
ItemsSource="{Binding RoomItems}">
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridCheckBoxColumn Binding="{Binding Necessity, Converter={StaticResource IntToBooleanConverter}}" Header="必要性" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding UnitProject}" Header="工程分类" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Name}" Header="房间名称" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding MinArea}" Header="最小面积①" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding MinEdgeLength}" Header="最短边长②" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Conditions}" Header="必要条件" IsReadOnly="True" />
|
||
|
|
<DataGridTextColumn Binding="{Binding InputValue, UpdateSourceTrigger=PropertyChanged}" Header="参数值" />
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||
|
|
<ComboBox Width="80" Margin="10">
|
||
|
|
<i:Interaction.Triggers>
|
||
|
|
<i:EventTrigger EventName="SelectionChanged">
|
||
|
|
<i:InvokeCommandAction Command="{Binding SelectLevel}" CommandParameter="{Binding Path=SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}}" />
|
||
|
|
</i:EventTrigger>
|
||
|
|
</i:Interaction.Triggers>
|
||
|
|
<ComboBoxItem Content="站厅层" />
|
||
|
|
<ComboBoxItem Content="站台层" />
|
||
|
|
</ComboBox>
|
||
|
|
<TextBlock
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Text="{Binding SelectedItem.Tips, ElementName=DgRoomData}"
|
||
|
|
TextWrapping="WrapWithOverflow" />
|
||
|
|
<!--<Button Content="应用" />
|
||
|
|
<Button Content=""/>-->
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|