116 lines
9.0 KiB
XML
116 lines
9.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"
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
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" Grid.ColumnSpan="2" Height="auto" BorderThickness="1"
|
|
BorderBrush="{Binding KeyBorderBrushColor, RelativeSource={RelativeSource AncestorType=UserControl}}" Margin="0"
|
|
IsChecked="{Binding IsFolding, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
|
|
HorizontalContentAlignment="{Binding KeyHorizontalAlignment, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Foreground="{Binding KeyTextFgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
mah:ControlsHelper.CornerRadius="{Binding KeyBorderCornerRadius, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
>
|
|
<ToggleButton.Content>
|
|
<TextBlock x:Name="TextKey" Grid.Column="0" FontWeight="Bold" Margin="{Binding KeyTextMargin, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Text="{Binding KeyText, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
FontSize="{Binding KeyTextSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
HorizontalAlignment="{Binding KeyHorizontalAlignment , RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
|
|
|
</ToggleButton.Content>
|
|
<ToggleButton.Style>
|
|
<Style TargetType="ToggleButton">
|
|
<!--<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<mah:ClipBorder Grid.Column="1" Name="Border" Margin="0" Padding="5 0" Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
CornerRadius="{Binding KeyBorderCornerRadius, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
|
<ContentControl>
|
|
<mah:ContentControlEx Grid.Column="1" Name="PART_ContentPresenter" Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}" />
|
|
</ContentControl>
|
|
</mah:ClipBorder>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>-->
|
|
<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="{Binding KeyTextCheckedBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeForeground}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{Binding KeyTextIsMouseOverBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeForeground}"/>
|
|
</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}}"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
/>
|
|
<Button Visibility="{Binding IsShowHelper, Converter={StaticResource convVisibleCollapsed}, RelativeSource={RelativeSource AncestorType=UserControl}}" Grid.Column="1" Content="?" HorizontalAlignment="Right" Margin="10,0" Width="20" Height="20"/>
|
|
<Border Grid.Row="1" Grid.ColumnSpan="2"
|
|
Background="{Binding ValueTextBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Margin="{Binding ValueMargin, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
BorderBrush="{Binding ValueBorderBrushColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
BorderThickness="{Binding ValueBorderThickness, RelativeSource={RelativeSource AncestorType=UserControl}}" >
|
|
<ContentControl 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}}"/>
|
|
</Border>
|
|
</Grid>
|
|
</base:UCKeyValueBase>
|