129 lines
5.9 KiB
Plaintext
129 lines
5.9 KiB
Plaintext
|
|
<controls:MaterialWindow
|
|||
|
|
x:Class="Szmedi.RevitToolkit.Approval.Views.FillArchiParametersView"
|
|||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|||
|
|
xmlns:controls="clr-namespace:Szmedi.RevitToolkit.Approval.Controls"
|
|||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|||
|
|
xmlns:ex="clr-namespace:Szmedi.RevitToolkit.Approval.Extensions"
|
|||
|
|
xmlns:local="clr-namespace:Szmedi.RevitToolkit.Approval.Views"
|
|||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
|
xmlns:model="clr-namespace:Szmedi.RevitToolkit.Approval.Models"
|
|||
|
|
xmlns:viewmodels="clr-namespace:Szmedi.RevitToolkit.Approval.ViewModels"
|
|||
|
|
Title="建筑工程信息"
|
|||
|
|
Width="800"
|
|||
|
|
Height="600"
|
|||
|
|
MinWidth="800"
|
|||
|
|
MinHeight="450"
|
|||
|
|
d:Background="#1e1e1e"
|
|||
|
|
d:DataContext="{d:DesignInstance Type=viewmodels:FillArchiParametersViewModel}"
|
|||
|
|
Style="{DynamicResource SZMEDIWindowStyle}"
|
|||
|
|
mc:Ignorable="d">
|
|||
|
|
<controls:MaterialWindow.Resources>
|
|||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RevitToolkit.Approval;component/SZMEDIResources.xaml" />
|
|||
|
|
</controls:MaterialWindow.Resources>
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<DataGrid
|
|||
|
|
x:Name="DataGridParams"
|
|||
|
|
Margin="5"
|
|||
|
|
AutoGenerateColumns="False"
|
|||
|
|
CanUserAddRows="False"
|
|||
|
|
EnableColumnVirtualization="True"
|
|||
|
|
EnableRowVirtualization="True"
|
|||
|
|
GridLinesVisibility="All"
|
|||
|
|
ItemsSource="{Binding Collection}">
|
|||
|
|
<!--<DataGrid.CellStyle>
|
|||
|
|
<Style TargetType="DataGridCell">
|
|||
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|||
|
|
-->
|
|||
|
|
<!-- 确保 TextBlock 也垂直居中(如果列内容是 TextBlock) -->
|
|||
|
|
<!--
|
|||
|
|
<Setter Property="Template">
|
|||
|
|
<Setter.Value>
|
|||
|
|
<ControlTemplate TargetType="DataGridCell">
|
|||
|
|
<Grid Background="{TemplateBinding Background}">
|
|||
|
|
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|||
|
|
</Grid>
|
|||
|
|
</ControlTemplate>
|
|||
|
|
</Setter.Value>
|
|||
|
|
</Setter>
|
|||
|
|
</Style>
|
|||
|
|
</DataGrid.CellStyle>-->
|
|||
|
|
<DataGrid.GroupStyle>
|
|||
|
|
<GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}">
|
|||
|
|
<GroupStyle.Panel>
|
|||
|
|
<ItemsPanelTemplate>
|
|||
|
|
<DataGridRowsPresenter />
|
|||
|
|
</ItemsPanelTemplate>
|
|||
|
|
</GroupStyle.Panel>
|
|||
|
|
</GroupStyle>
|
|||
|
|
</DataGrid.GroupStyle>
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<DataGridCheckBoxColumn
|
|||
|
|
Binding="{Binding IsChecked, Mode=TwoWay}"
|
|||
|
|
CanUserSort="False"
|
|||
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnEditingStyle}"
|
|||
|
|
ElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnStyle}">
|
|||
|
|
<DataGridCheckBoxColumn.Header>
|
|||
|
|
<CheckBox
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Content="全选"
|
|||
|
|
IsChecked="{Binding DataContext.CheckedForFilter, Mode=TwoWay, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
IsThreeState="False" />
|
|||
|
|
</DataGridCheckBoxColumn.Header>
|
|||
|
|
</DataGridCheckBoxColumn>
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="200"
|
|||
|
|
Binding="{Binding DefinitionName}"
|
|||
|
|
Header="属性名称"
|
|||
|
|
IsReadOnly="True" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="150"
|
|||
|
|
Binding="{Binding Name}"
|
|||
|
|
Header="属性名称"
|
|||
|
|
IsReadOnly="True" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="150"
|
|||
|
|
Binding="{Binding DefaultValue}"
|
|||
|
|
Header="参数值" />
|
|||
|
|
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding ValueRange}"
|
|||
|
|
Header="取值范围"
|
|||
|
|
IsReadOnly="True" />
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
<UniformGrid
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Margin="5"
|
|||
|
|
HorizontalAlignment="Right"
|
|||
|
|
Rows="1">
|
|||
|
|
<TextBox
|
|||
|
|
Width="150"
|
|||
|
|
Margin="5"
|
|||
|
|
md:HintAssist.Hint="检索分类"
|
|||
|
|
Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}" />
|
|||
|
|
<ComboBox
|
|||
|
|
Margin="5"
|
|||
|
|
md:HintAssist.Hint="专业"
|
|||
|
|
ItemsSource="{ex:EnumSource BindToDescription=True,
|
|||
|
|
EnumType={x:Type model:Major}}"
|
|||
|
|
SelectedValue="{Binding SelectedMajor}"/>
|
|||
|
|
<CheckBox
|
|||
|
|
HorizontalAlignment="Right"
|
|||
|
|
Content="手动选择"
|
|||
|
|
IsChecked="{Binding IsManual}"
|
|||
|
|
ToolTip="手动选择需要填写的构件,无视分类" />
|
|||
|
|
<Button
|
|||
|
|
Margin="5"
|
|||
|
|
Command="{Binding ModifyParameterValueCommand}"
|
|||
|
|
Content="批量填写" ToolTip="默认根据分类标签填写,比如标识平开窗是建筑窗的子类, 自动处理会把所有建筑窗及子类的参数统一修改"/>
|
|||
|
|
</UniformGrid>
|
|||
|
|
</Grid>
|
|||
|
|
</controls:MaterialWindow>
|