603 lines
35 KiB
XML
603 lines
35 KiB
XML
<UserControl
|
|
x:Class="XplorePlane.Views.PipelineEditorView"
|
|
x:Name="RootControl"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="700"
|
|
d:DesignWidth="300"
|
|
mc:Ignorable="d">
|
|
|
|
<UserControl.Resources>
|
|
<SolidColorBrush x:Key="PanelBg" Color="White" />
|
|
<SolidColorBrush x:Key="PanelBorder" Color="#CDCBCB" />
|
|
<SolidColorBrush x:Key="SeparatorBrush" Color="#E0E0E0" />
|
|
<SolidColorBrush x:Key="AccentBlue" Color="#D9ECFF" />
|
|
<SolidColorBrush x:Key="DisabledNodeBg" Color="#F3F3F3" />
|
|
<SolidColorBrush x:Key="DisabledNodeLine" Color="#B9B9B9" />
|
|
<SolidColorBrush x:Key="DisabledNodeText" Color="#8A8A8A" />
|
|
<FontFamily x:Key="UiFont">Microsoft YaHei UI</FontFamily>
|
|
|
|
<Style x:Key="PipelineNodeItemStyle" TargetType="ListBoxItem">
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="{StaticResource AccentBlue}" />
|
|
<Setter Property="BorderBrush" Value="#5B9BD5" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="ToolbarBtn" TargetType="Button">
|
|
<Setter Property="Height" Value="28" />
|
|
<Setter Property="Width" Value="32" />
|
|
<Setter Property="MinWidth" Value="32" />
|
|
<Setter Property="Margin" Value="2,0" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="#CDCBCB" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="FontFamily" Value="{StaticResource UiFont}" />
|
|
<Setter Property="FontSize" Value="11" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Border
|
|
Background="{StaticResource PanelBg}"
|
|
BorderBrush="{StaticResource PanelBorder}"
|
|
BorderThickness="1"
|
|
CornerRadius="4">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="6*" MinHeight="200" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="5*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border
|
|
Grid.Row="0"
|
|
Padding="6,4"
|
|
Background="#F5F5F5"
|
|
BorderBrush="{StaticResource PanelBorder}"
|
|
BorderThickness="0,1,0,1">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Command="{Binding NewPipelineCommand}"
|
|
Style="{StaticResource ToolbarBtn}"
|
|
ToolTip="新建配方">
|
|
<TextBlock
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="14"
|
|
Text="" />
|
|
</Button>
|
|
<Button
|
|
Command="{Binding SavePipelineCommand}"
|
|
Style="{StaticResource ToolbarBtn}"
|
|
ToolTip="保存当前配方">
|
|
<TextBlock
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="14"
|
|
Text="" />
|
|
</Button>
|
|
<Button
|
|
Command="{Binding SaveAsPipelineCommand}"
|
|
Style="{StaticResource ToolbarBtn}"
|
|
ToolTip="另存当前配方">
|
|
<TextBlock
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="14"
|
|
Text="" />
|
|
</Button>
|
|
<Button
|
|
Command="{Binding LoadPipelineCommand}"
|
|
Style="{StaticResource ToolbarBtn}"
|
|
ToolTip="加载配方">
|
|
<TextBlock
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="14"
|
|
Text="" />
|
|
</Button>
|
|
|
|
<Button DockPanel.Dock="Right"
|
|
Style="{StaticResource ToolbarBtn}"
|
|
ToolTip="实时">
|
|
<TextBlock FontFamily="Segoe MDL2 Assets" FontSize="14" Text="" />
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="2,4,2,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
FontWeight="SemiBold"
|
|
Foreground="#333333"
|
|
Text="{Binding PipelineFileDisplayName}"
|
|
TextAlignment="Left"
|
|
TextTrimming="CharacterEllipsis"
|
|
ToolTip="{Binding PipelineFileDisplayName}" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ListBox
|
|
x:Name="PipelineListBox"
|
|
Grid.Row="1"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
ItemContainerStyle="{StaticResource PipelineNodeItemStyle}"
|
|
ItemsSource="{Binding PipelineNodes}"
|
|
KeyboardNavigation.TabNavigation="Continue"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
SelectedItem="{Binding SelectedNode, Mode=TwoWay}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
x:Name="NodeContainer"
|
|
Margin="2,0"
|
|
Padding="2"
|
|
Tag="{Binding DataContext, ElementName=RootControl}"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="1"
|
|
CornerRadius="3">
|
|
<Border.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="执行到此处"
|
|
Command="{Binding PlacementTarget.Tag.ExecuteToNodeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
CommandParameter="{Binding}" />
|
|
<MenuItem Header="执行全部"
|
|
Command="{Binding PlacementTarget.Tag.ClearExecutionRangeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
|
</ContextMenu>
|
|
</Border.ContextMenu>
|
|
<Grid x:Name="NodeRoot" MinHeight="48">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="44" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- 贯穿整行的竖线,Margin负值延伸到ListBoxItem边界外,确保节点间无断点 -->
|
|
<Rectangle
|
|
x:Name="ConnectLine"
|
|
Width="2"
|
|
Margin="0,-4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
Fill="#5B9BD5" />
|
|
|
|
<Border
|
|
x:Name="IconBorder"
|
|
Grid.Column="0"
|
|
Width="28"
|
|
Height="28"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Background="#E8F0FE"
|
|
BorderBrush="#5B9BD5"
|
|
BorderThickness="1.5"
|
|
CornerRadius="4">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontSize="13"
|
|
Text="{Binding IconPath}" />
|
|
</Border>
|
|
|
|
<StackPanel Grid.Column="1" Margin="6,0,0,0" VerticalAlignment="Center">
|
|
<TextBlock
|
|
x:Name="NodeTitle"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="12"
|
|
Text="{Binding DisplayName}" />
|
|
<TextBlock
|
|
x:Name="NodeState"
|
|
Margin="0,2,0,0"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="10"
|
|
Foreground="#6E6E6E"
|
|
Text="{Binding NodeStateText}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
<DataTemplate.Triggers>
|
|
<DataTrigger Binding="{Binding IsEnabled}" Value="False">
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="{StaticResource DisabledNodeBg}" />
|
|
<Setter TargetName="NodeContainer" Property="Opacity" Value="0.78" />
|
|
<Setter TargetName="ConnectLine" Property="Fill" Value="{StaticResource DisabledNodeLine}" />
|
|
<Setter TargetName="IconBorder" Property="BorderBrush" Value="{StaticResource DisabledNodeLine}" />
|
|
<Setter TargetName="IconBorder" Property="Background" Value="#ECECEC" />
|
|
<Setter TargetName="NodeTitle" Property="Foreground" Value="{StaticResource DisabledNodeText}" />
|
|
<Setter TargetName="NodeState" Property="Foreground" Value="#9A6767" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsExecutionEndNode}" Value="True">
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#E8F6EA" />
|
|
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#4F9D69" />
|
|
<Setter TargetName="IconBorder" Property="Background" Value="#E8F6EA" />
|
|
<Setter TargetName="IconBorder" Property="BorderBrush" Value="#4F9D69" />
|
|
<Setter TargetName="NodeState" Property="Foreground" Value="#2E7D32" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsSkippedByExecutionRange}" Value="True">
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#FAFAFA" />
|
|
<Setter TargetName="NodeContainer" Property="Opacity" Value="0.72" />
|
|
<Setter TargetName="ConnectLine" Property="Fill" Value="#D0D0D0" />
|
|
<Setter TargetName="IconBorder" Property="BorderBrush" Value="#C8C8C8" />
|
|
<Setter TargetName="IconBorder" Property="Background" Value="#F4F4F4" />
|
|
<Setter TargetName="NodeTitle" Property="Foreground" Value="#909090" />
|
|
<Setter TargetName="NodeState" Property="Foreground" Value="#A0A0A0" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=IsSelected}" Value="True">
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#D9ECFF" />
|
|
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#5B9BD5" />
|
|
</DataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsExecutionEndNode}" Value="True" />
|
|
<Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=IsSelected}" Value="True" />
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#DFF0E3" />
|
|
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#3F8A58" />
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsEnabled}" Value="False" />
|
|
<Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=IsSelected}" Value="True" />
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#E6EEF7" />
|
|
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#7E9AB6" />
|
|
<Setter TargetName="NodeContainer" Property="Opacity" Value="1" />
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsSkippedByExecutionRange}" Value="True" />
|
|
<Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=IsSelected}" Value="True" />
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter TargetName="NodeContainer" Property="Background" Value="#EEF1F4" />
|
|
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#AAB4BF" />
|
|
<Setter TargetName="NodeContainer" Property="Opacity" Value="0.9" />
|
|
</MultiDataTrigger>
|
|
</DataTemplate.Triggers>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<Rectangle
|
|
Grid.Row="2"
|
|
Height="1"
|
|
Fill="{StaticResource SeparatorBrush}" />
|
|
|
|
<ScrollViewer
|
|
Grid.Row="3"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Margin="8,6">
|
|
<TextBlock
|
|
Margin="0,0,0,4"
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
FontWeight="Bold"
|
|
Foreground="#555"
|
|
Text="属性" />
|
|
|
|
<!-- ROI 编辑区(仅高级模块算子显示) -->
|
|
<Border
|
|
Margin="0,0,0,8"
|
|
Padding="8,6"
|
|
Background="#F0F7FF"
|
|
BorderBrush="#B0D4F1"
|
|
BorderThickness="1"
|
|
CornerRadius="4">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding SelectedNodeIsAdvancedModule}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<StackPanel>
|
|
<!-- 标题行 -->
|
|
<DockPanel Margin="0,0,0,4">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
FontWeight="SemiBold"
|
|
Foreground="#1A5276"
|
|
Text="ROI 区域" />
|
|
</DockPanel>
|
|
|
|
<!-- ROI 摘要 -->
|
|
<TextBlock
|
|
Margin="0,0,0,6"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="10"
|
|
Foreground="#555"
|
|
Text="{Binding SelectedNodeRoiSummary}"
|
|
TextWrapping="Wrap" />
|
|
|
|
<!-- 编辑中提示 -->
|
|
<Border
|
|
Margin="0,0,0,6"
|
|
Padding="6,4"
|
|
Background="#FFF3CD"
|
|
BorderBrush="#FFEAA7"
|
|
BorderThickness="1"
|
|
CornerRadius="3">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsRoiEditing}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="10"
|
|
Foreground="#856404"
|
|
Text="在图像上点击添加顶点,拖动顶点调整位置"
|
|
TextWrapping="Wrap" />
|
|
</Border>
|
|
|
|
<!-- 操作按钮 -->
|
|
<StackPanel Orientation="Horizontal">
|
|
<!-- 编辑 ROI 按钮(非编辑状态显示) -->
|
|
<Button
|
|
Height="24"
|
|
Margin="0,0,4,0"
|
|
Padding="8,0"
|
|
Command="{Binding EditRoiCommand}"
|
|
Cursor="Hand"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
ToolTip="在图像上绘制 ROI 多边形">
|
|
<Button.Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Background" Value="#2980B9" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Content" Value="✏ 编辑 ROI" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsRoiEditing}" Value="True">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
|
|
<!-- 完成 ROI 按钮(编辑状态显示) -->
|
|
<Button
|
|
Height="24"
|
|
Margin="0,0,4,0"
|
|
Padding="8,0"
|
|
Command="{Binding FinishRoiCommand}"
|
|
Cursor="Hand"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
ToolTip="完成 ROI 编辑">
|
|
<Button.Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Background" Value="#27AE60" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Content" Value="✔ 完成 ROI" />
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsRoiEditing}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
|
|
<!-- 清除 ROI 按钮 -->
|
|
<Button
|
|
Height="24"
|
|
Padding="8,0"
|
|
Command="{Binding ClearRoiCommand}"
|
|
Cursor="Hand"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
ToolTip="清除 ROI,恢复全图检测">
|
|
<Button.Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Background" Value="#E74C3C" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Content" Value="✕ 清除" />
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<ItemsControl ItemsSource="{Binding SelectedNode.Parameters}">
|
|
<ItemsControl.ItemContainerStyle>
|
|
<Style TargetType="ContentPresenter">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsVisible}" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ItemsControl.ItemContainerStyle>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Margin="0,3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
Text="{Binding DisplayName}"
|
|
TextTrimming="CharacterEllipsis" />
|
|
|
|
<Grid Grid.Column="1">
|
|
<Grid.Style>
|
|
<Style TargetType="Grid">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSliderInput}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Grid.Style>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="52" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox
|
|
Grid.Column="0"
|
|
Margin="0,0,6,0"
|
|
Padding="2,2"
|
|
VerticalAlignment="Center"
|
|
BorderBrush="#CDCBCB"
|
|
BorderThickness="1"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
Text="{Binding SliderValue, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />
|
|
|
|
<Grid Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0">
|
|
<TextBlock
|
|
HorizontalAlignment="Left"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="9"
|
|
Foreground="#999999"
|
|
Text="{Binding SliderMinimum}" />
|
|
<TextBlock
|
|
HorizontalAlignment="Right"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="9"
|
|
Foreground="#999999"
|
|
Text="{Binding SliderMaximum}" />
|
|
</Grid>
|
|
<Slider
|
|
Grid.Row="1"
|
|
VerticalAlignment="Center"
|
|
IsSnapToTickEnabled="{Binding IsIntegerSlider}"
|
|
LargeChange="{Binding SliderLargeChange}"
|
|
Maximum="{Binding SliderMaximum}"
|
|
Minimum="{Binding SliderMinimum}"
|
|
SmallChange="{Binding SliderSmallChange}"
|
|
TickFrequency="{Binding SliderTickFrequency}"
|
|
Value="{Binding SliderValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<TextBox
|
|
Grid.Column="1"
|
|
Padding="2,2"
|
|
BorderBrush="#CDCBCB"
|
|
BorderThickness="1"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}">
|
|
<TextBox.Style>
|
|
<Style TargetType="TextBox">
|
|
<Setter Property="Background" Value="White" />
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsTextInput}" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsValueValid}" Value="False">
|
|
<Setter Property="BorderBrush" Value="#D9534F" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBox.Style>
|
|
</TextBox>
|
|
|
|
<ComboBox
|
|
Grid.Column="1"
|
|
MinHeight="24"
|
|
Padding="4,1"
|
|
HorizontalContentAlignment="Left"
|
|
VerticalContentAlignment="Center"
|
|
BorderBrush="#CDCBCB"
|
|
BorderThickness="1"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
ItemsSource="{Binding Options}"
|
|
SelectedItem="{Binding SelectedOption, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|
<ComboBox.Style>
|
|
<Style TargetType="ComboBox">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding HasOptions}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ComboBox.Style>
|
|
</ComboBox>
|
|
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
FontFamily="{StaticResource UiFont}"
|
|
FontSize="11"
|
|
IsChecked="{Binding BoolValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|
<CheckBox.Style>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsBool}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</CheckBox.Style>
|
|
</CheckBox>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|
|
|