117 lines
5.6 KiB
XML
117 lines
5.6 KiB
XML
<ex:FluentWindowEx
|
|
x:Class="Sai.RvKits.RvMEP.AnyConnectView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:ex="https://github.com/sherlockforrest/Wpf.Ui.Extend"
|
|
xmlns:local="clr-namespace:Sai.RvKits.RvMEP"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
Title="任意连接"
|
|
Width="270"
|
|
Height="350"
|
|
MinHeight="350"
|
|
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
|
|
SizeToContent="Height"
|
|
mc:Ignorable="d">
|
|
<Window.Resources>
|
|
<ResourceDictionary Source="pack://application:,,,/Sai.RvKits;component/WPFUI.xaml" />
|
|
</Window.Resources>
|
|
<ex:StackPanelEx Margin="5" Spacing="5">
|
|
<ui:InfoBar
|
|
VerticalAlignment="Top"
|
|
IsOpen="{Binding ActiveSnackbar, Mode=OneWay}"
|
|
Message="{Binding Message}" />
|
|
<GroupBox Header="角度" ToolTip="平行或垂直连接时生效">
|
|
<UniformGrid Columns="3">
|
|
<RadioButton Content="默认" ToolTip="根据当前位置自动连接">
|
|
<RadioButton.IsChecked>
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
<Binding.ConverterParameter>
|
|
<system:Double>0</system:Double>
|
|
</Binding.ConverterParameter>
|
|
</Binding>
|
|
</RadioButton.IsChecked>
|
|
</RadioButton>
|
|
<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 x:Name="LbCustom" Content="自定义" />
|
|
<TextBox
|
|
VerticalAlignment="Center"
|
|
IsEnabled="{Binding IsChecked, ElementName=LbCustom}"
|
|
Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
<GroupBox Header="选择方式">
|
|
<UniformGrid Rows="1">
|
|
<RadioButton
|
|
Content="多选"
|
|
IsChecked="{Binding IsMultiSelect}"
|
|
ToolTip="选择后完成" />
|
|
<RadioButton
|
|
Content="框选"
|
|
IsChecked="{Binding IsMultiSelect, Converter={StaticResource InvertBooleanConverter}}"
|
|
ToolTip="矩形框框选" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
<ui:Button
|
|
HorizontalAlignment="Stretch"
|
|
Command="{Binding ConnectCommand}"
|
|
Content="连接管线"
|
|
Icon="{ui:SymbolIcon Connector24}" />
|
|
</ex:StackPanelEx>
|
|
</ex:FluentWindowEx>
|