2026-03-30 17:09:29 +09:00

86 lines
6.0 KiB
XML

<base:UCKeyValueBase x:Class="AuroraUIComponent.UserControls.UCKeyContentView"
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:AuroraUIComponent.UserControls"
xmlns:base="clr-namespace:AuroraUIComponent.UserControls.KeyValueBase"
mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=local:UCKeyContentView}"
d:DesignHeight="50" d:DesignWidth="500" FontSize="12"
d:DesignStyle="{StaticResource ResourceKey=ErrorInToolTipStyle}">
<base:UCKeyValueBase.Resources>
<ResourceDictionary>
<Style TargetType="ToggleButton">
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="False">
<Setter Property="Background" Value="DarkRed" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="DimGray" />
<Setter Property="Foreground" Value="LightBlue" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedDeep}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
</base:UCKeyValueBase.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="MainToggleButton" Margin="5,0,0,0" Grid.ColumnSpan="2" Height="auto" BorderThickness="1" BorderBrush="Black"
IsChecked="{Binding IsFolding, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
Visibility="{Binding UseFoldingButton, Converter={StaticResource convVisibleCollapsed}, RelativeSource={RelativeSource AncestorType=UserControl}}"
HorizontalContentAlignment="{Binding KeyHorizontalAlignment, RelativeSource={RelativeSource AncestorType=UserControl}}"
Foreground="{Binding KeyTextFgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
>
<ToggleButton.Content>
<TextBlock x:Name="TextKey" Grid.Column="0" FontWeight="Bold"
Margin="20,2,0,4"
Text="{Binding KeyText, RelativeSource={RelativeSource AncestorType=UserControl}}"
FontSize="{Binding KeyTextSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
</ToggleButton.Content>
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="False">
<Setter Property="Background" Value="{Binding KeyTextBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<Setter Property="Foreground" Value="{Binding KeyTextFgColor, RelativeSource={RelativeSource AncestorType=UserControl}}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#3A3A3A" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedDeep}" />
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<ToggleButton Margin="{Binding FoldingBtnMargin, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsChecked="{Binding IsFolding, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
Visibility="{Binding UseFoldingButton, Converter={StaticResource convVisibleCollapsed}, RelativeSource={RelativeSource AncestorType=UserControl}}"
Style="{Binding FoldingBtnStyle, RelativeSource={RelativeSource AncestorType=UserControl}, FallbackValue={StaticResource defaultToggleButton}}"
Width="{Binding FoldingBtnWidth, RelativeSource={RelativeSource AncestorType=UserControl}}"
Height="{Binding FoldingBtnHeight, RelativeSource={RelativeSource AncestorType=UserControl}}"
/>
<Button Visibility="{Binding IsShowHelper, Converter={StaticResource convVisibleCollapsed}, RelativeSource={RelativeSource AncestorType=UserControl}}" Grid.Column="1" Content="?" HorizontalAlignment="Right" Margin="10,0" Width="20" Height="20"/>
<ContentControl Grid.Row="1" Grid.Column="1" Margin="2" VerticalContentAlignment="{Binding ValueVerticalAlignment, RelativeSource={RelativeSource AncestorType=UserControl}}"
HorizontalContentAlignment="{Binding ValueHorizontalAlignment, RelativeSource={RelativeSource AncestorType=UserControl}}"
Content="{Binding ContentView, RelativeSource={RelativeSource AncestorType=UserControl}}"
Visibility="{Binding IsFolding, Converter={StaticResource convCollapsedVisible}, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
</Grid>
</base:UCKeyValueBase>