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

102 lines
4.9 KiB
XML

<ui:NeoWindow
Height="280"
MinHeight="280"
MinWidth="250"
SizeToContent="Height"
Title="旋转模型"
Width="250"
d:DataContext="{d:DesignInstance Type={x:Type rvMep:RotateMEPViewModel}}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.RotateMEPView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<GroupBox
Grid.Column="0"
Grid.Row="0"
Header="角度(°)">
<UniformGrid Columns="3" Rows="3">
<RadioButton Content="15°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>15</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="22.5°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>22.5</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="30°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>30</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="45°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>45</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="60°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>60</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="90°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
<System:Double>90</System:Double>
</Binding.ConverterParameter>
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="自定义" x:Name="LbCustom" />
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=LbCustom}" />
</UniformGrid>
</GroupBox>
<CheckBox
Content="是否单选"
Grid.Column="0"
Grid.Row="1"
IsChecked="{Binding IsSingleSelect}"
ToolTip="单选构件,取消则可以多选构件" />
<Button
Command="{Binding RotateInstanceCommand}"
Content="旋转"
Grid.Column="0"
Grid.Row="2"
HorizontalAlignment="Stretch"
ToolTip="当选中构件时,则直接旋转,未选中时,则根据选项决定是多选还是单选" />
</ui:StackPanel>
</ui:NeoWindow>