50 lines
2.4 KiB
Plaintext
50 lines
2.4 KiB
Plaintext
|
|
<ex:FluentWindowEx
|
||
|
|
x:Class="Sai.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:Sai.RvKits.RvMEP"
|
||
|
|
xmlns:ex="https://github.com/sherlockforrest/Wpf.Ui.Extend"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||
|
|
Title="线缆布置"
|
||
|
|
Width="220"
|
||
|
|
Height="200"
|
||
|
|
MinWidth="220"
|
||
|
|
d:DataContext="{d:DesignInstance Type=electricDesign:CableLayoutViewModel}"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<Window.Resources>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Sai.RvKits;component/WPFUI.xaml" />
|
||
|
|
</Window.Resources>
|
||
|
|
<ex:StackPanelEx Margin="5" Spacing="5">
|
||
|
|
<ex: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>
|
||
|
|
</ex:ComboBoxEx>
|
||
|
|
<ex: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>
|
||
|
|
</ex:StackPanelEx>
|
||
|
|
</ex:FluentWindowEx>
|