Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/RvMEP/RotateMEPView.xaml

101 lines
4.9 KiB
Plaintext
Raw Normal View History

2026-01-02 17:30:41 +08:00
<ui:MelWindow
2025-04-24 20:56:44 +08:00
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.RotateMEPView"
2024-09-22 11:05:41 +08:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2025-10-10 11:19:58 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2024-09-22 11:05:41 +08:00
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
2025-04-24 20:56:44 +08:00
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
2024-09-22 11:05:41 +08:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
2025-04-24 20:56:44 +08:00
xmlns:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
2026-01-02 17:30:41 +08:00
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
2025-10-10 11:19:58 +08:00
Title="旋转模型"
Width="300"
Height="220"
d:DataContext="{d:DesignInstance Type={x:Type rvMep:RotateMEPViewModel}}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
mc:Ignorable="d">
2024-09-22 11:05:41 +08:00
<Window.Resources>
2025-04-24 20:56:10 +08:00
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
2024-09-22 11:05:41 +08:00
</Window.Resources>
2025-04-24 20:56:10 +08:00
<ui:StackPanel Margin="5" Spacing="5">
2024-09-22 11:05:41 +08:00
<GroupBox
2025-04-24 20:56:44 +08:00
Grid.Row="0"
2025-10-10 11:19:58 +08:00
Grid.Column="0"
2024-09-22 11:05:41 +08:00
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>
2025-10-10 11:19:58 +08:00
<RadioButton x:Name="LbCustom" Content="自定义" />
2025-09-12 09:55:36 +08:00
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}, ElementName=LbCustom}" />
2024-09-22 11:05:41 +08:00
</UniformGrid>
</GroupBox>
<CheckBox
2025-04-24 20:56:44 +08:00
Grid.Row="1"
2025-10-10 11:19:58 +08:00
Grid.Column="0"
Content="是否单选"
2024-09-22 11:05:41 +08:00
IsChecked="{Binding IsSingleSelect}"
ToolTip="单选构件,取消则可以多选构件" />
<Button
2025-04-24 20:56:44 +08:00
Grid.Row="2"
2025-10-10 11:19:58 +08:00
Grid.Column="0"
2025-04-24 20:56:44 +08:00
HorizontalAlignment="Stretch"
2025-10-10 11:19:58 +08:00
Command="{Binding RotateInstanceCommand}"
Content="旋转"
2024-09-22 11:05:41 +08:00
ToolTip="当选中构件时,则直接旋转,未选中时,则根据选项决定是多选还是单选" />
2025-04-24 20:56:10 +08:00
</ui:StackPanel>
2026-01-02 17:30:41 +08:00
</ui:MelWindow>