Files
Shrlalgo.RvKits/ShrlAlgo.RvKits/RvMEP/CableLayoutView.xaml

50 lines
2.3 KiB
XML

<ui:FluentWindowEx
x:Class="ShrlAlgo.RvKits.RvMEP.CableLayoutView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:electricDesign="clr-namespace:ShrlAlgo.RvKits.RvMEP"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
Title="线缆布置"
Width="220"
Height="200"
MinWidth="220"
d:DataContext="{d:DesignInstance Type=electricDesign:CableLayoutViewModel}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgo.RvKits;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanelEx Margin="5" Spacing="5">
<ui:ComboBoxEx
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding Specifications}"
PlaceholderText="线缆型号"
SelectedItem="{Binding SelectedConduitType, UpdateSourceTrigger=PropertyChanged}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="SelectionChanged">
<b:InvokeCommandAction Command="{Binding SelectionTypeCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</ui:ComboBoxEx>
<ui:ComboBoxEx
DisplayMemberPath="Key"
ItemsSource="{Binding Sizes}"
PlaceholderText="线缆线径"
SelectedValue="{Binding Size, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Value" />
<ui:TextBox
InputMethod.IsInputMethodEnabled="False"
PlaceholderText="线缆数量"
Text="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
<Button HorizontalAlignment="Stretch" Content="布置">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Click">
<b:InvokeCommandAction Command="{Binding CloseWinCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</Button>
</ui:StackPanelEx>
</ui:FluentWindowEx>