Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/RvMEP/StandMepCurveView.xaml
2025-04-24 20:56:44 +08:00

96 lines
4.4 KiB
XML

<ui:FluentWindowEx
Height="320"
MinHeight="320"
MinWidth="300"
SizeToContent="Height"
Title="创建立管"
Width="300"
WindowStartupLocation="CenterOwner"
d:DataContext="{d:DesignInstance Type=rvMep:StandMepCurveViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.StandMepCurveView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<b:Interaction.Triggers>
<!--<b:EventTrigger EventName="Deactivated">
<b:InvokeCommandAction Command="{Binding CreateMepCurveCommand}" />
</b:EventTrigger>-->
<b:EventTrigger EventName="Closing">
<b:InvokeCommandAction Command="{Binding CancelCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<ui:StackPanel Spacing="5">
<UniformGrid Rows="1">
<RadioButton
Content="水管"
IsChecked="{Binding IsPipe}"
x:Name="RbPipe" />
<RadioButton
Content="风管"
IsChecked="{Binding IsDuct}"
x:Name="RbDuct" />
<RadioButton
Content="桥架"
IsChecked="{Binding IsCableTray}"
x:Name="RbCableTray" />
<RadioButton
Content="线管"
IsChecked="{Binding IsConduit}"
x:Name="RbConduit" />
</UniformGrid>
<ui:StackPanel Spacing="5" Visibility="{Binding IsPipe, Converter={StaticResource BooleanToVisConverter}}">
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding PipeTypes}"
PlaceholderText="&lt;管道类型&gt;"
SelectedItem="{Binding SelectedPipeType}" />
<ui:ComboBoxEx
DisplayMemberPath="Name"
ItemsSource="{Binding PipeSystemTypes}"
PlaceholderText="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedPipeSystemType}" />
</ui:StackPanel>
<ui:StackPanel Spacing="5" Visibility="{Binding IsDuct, Converter={StaticResource BooleanToVisConverter}}">
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding DuctTypes}"
PlaceholderText="&lt;风管类型&gt;"
SelectedItem="{Binding SelectedDuctType}" />
<ui:ComboBoxEx
DisplayMemberPath="Name"
ItemsSource="{Binding DuctSystemTypes}"
PlaceholderText="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedDuctSystemType}" />
</ui:StackPanel>
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ConduitTypes}"
PlaceholderText="&lt;线管类型&gt;"
SelectedItem="{Binding SelectedConduitType}"
Visibility="{Binding IsConduit, Converter={StaticResource BooleanToVisConverter}}" />
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding CableTrayTypes}"
PlaceholderText="&lt;桥架类型&gt;"
SelectedItem="{Binding SelectedCableTrayType}"
Visibility="{Binding IsCableTray, Converter={StaticResource BooleanToVisConverter}}" />
</ui:StackPanel>
<Button
Command="{Binding CreateMepCurveCommand}"
Content="创建立管"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom" />
</ui:StackPanel>
</ui:FluentWindowEx>