Kyungshin-Welder/AuroraVision/VisionUI/RecipeMenu/UCVisionRecipeMenuView.xaml
2026-01-26 14:51:28 +09:00

94 lines
5.1 KiB
XML

<UserControl x:Class="VisionUI.RecipeMenu.UCVisionRecipeMenuView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VisionUI.RecipeMenu"
xmlns:behavior="http://schemas.microsoft.com/xaml/behaviors"
xmlns:aurora ="clr-namespace:Aurora.View;assembly=Aurora"
xmlns:mah ="http://metro.mahapps.com/winfx/xaml/controls"
x:Name="ucVisionRecipeMenuView" SizeChanged="ucVisionRecipeMenuView_SizeChanged"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<aurora:BoolToVisibilityConverter
x:Key="visibilityInverter"
True="Visible"
False="Collapsed"/>
<CollectionViewSource x:Key="UnitIdList" Source="{Binding UnitIdList}" />
<CollectionViewSource x:Key="SubSysIdList" Source="{Binding SubSysIdList}" />
<CollectionViewSource x:Key="SubSysTypeList" Source="{Binding SubSysTypeList}" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<!-- Unit / SubSystem -->
<Grid x:Name="InfoGrid" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" MinHeight= "30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Content="Open Full Menu" Command="{Binding CMD_OpenPropertyGrid}" Style="{StaticResource StButtonAccent}" Margin="0,4"/>
<ContentPresenter x:Name="UnitSubsysSelect" Grid.ColumnSpan="2" Grid.Row="1" Grid.Column="0"/>
</Grid>
<!-- SubSystem Selected List -->
<GroupBox Grid.Row="1" Header="SubSysProperties">
<ItemsControl ItemsSource="{Binding SubsystemPropertyNameList}" IsEnabled="{Binding IsEnabledSelectedSubSysItem}" Margin="1">
<ItemsControl.ItemsPanel >
<ItemsPanelTemplate>
<UniformGrid Columns="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton Style="{StaticResource StToggleButtonAccentPurple}" Content="{Binding .}" GroupName="Property" mah:ControlsHelper.CornerRadius="8">
<!-- desinger 보고싶을 시 아래 코드 주석처리. -->
<behavior:Interaction.Triggers>
<behavior:EventTrigger EventName="Checked">
<behavior:InvokeCommandAction Command="{Binding DataContext.CMD_SelectProperty, ElementName=ucVisionRecipeMenuView}"
CommandParameter="{Binding .}"/>
</behavior:EventTrigger>
</behavior:Interaction.Triggers>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</GroupBox>
<Grid Grid.Column="1" Grid.RowSpan="3" Margin="10,0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Selected Property Name -->
<TextBlock Text="{Binding SelectedSubsystemPropertyName}" Foreground="{DynamicResource AVHighlightBlue}" FontSize="15" Margin="10,0,10,5"/>
<GroupBox Grid.Row="1" Header="{Binding VisionPropertyViewHeader}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Visibility="{Binding IsFovAlign, Converter={StaticResource visibilityInverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto" MinWidth="60"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" Content="+" Command="{Binding CMD_AddRecipe}" CommandParameter="{Binding SelectedSubsysItem}" Margin="0"/>
</Grid>
<ScrollContentPresenter Grid.Row="1" Content="{Binding VisionPropertyView}" IsEnabled="{Binding IsEnabledSelectedSubSysItem}" />
</Grid>
</GroupBox>
</Grid>
</Grid>
</UserControl>