Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/RvMEP/StandMepCurveView.xaml
ShrlAlgo 955a01f564 整理
2025-08-20 12:10:35 +08:00

96 lines
4.5 KiB
XML

<ui:NeoWindow
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/NeoUI"
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={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding PipeTypes}"
ui:InputAssist.Placeholder="&lt;管道类型&gt;"
SelectedItem="{Binding SelectedPipeType}" />
<ComboBox
DisplayMemberPath="Name"
ItemsSource="{Binding PipeSystemTypes}"
ui:InputAssist.Placeholder="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedPipeSystemType}" />
</ui:StackPanel>
<ui:StackPanel Spacing="5" Visibility="{Binding IsDuct, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding DuctTypes}"
ui:InputAssist.Placeholder="&lt;风管类型&gt;"
SelectedItem="{Binding SelectedDuctType}" />
<ComboBox
DisplayMemberPath="Name"
ItemsSource="{Binding DuctSystemTypes}"
ui:InputAssist.Placeholder="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedDuctSystemType}" />
</ui:StackPanel>
<ComboBox
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ConduitTypes}"
ui:InputAssist.Placeholder="&lt;线管类型&gt;"
SelectedItem="{Binding SelectedConduitType}"
Visibility="{Binding IsConduit, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
<ComboBox
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding CableTrayTypes}"
ui:InputAssist.Placeholder="&lt;桥架类型&gt;"
SelectedItem="{Binding SelectedCableTrayType}"
Visibility="{Binding IsCableTray, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
</ui:StackPanel>
<Button
Command="{Binding CreateMepCurveCommand}"
Content="创建立管"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom" />
</ui:StackPanel>
</ui:NeoWindow>