60 lines
3.5 KiB
XML
60 lines
3.5 KiB
XML
<UserControl x:Class="Intromat.Views.Editors.EditorHeader"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="30" d:DesignWidth="800">
|
|
<Grid Margin="0,0,0,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" x:Name="_textBlockName" Foreground="{DynamicResource ControlDefaultForeground}" HorizontalAlignment="Stretch" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
|
<ComboBox Grid.Column="1" x:Name="_comboBoxRelativeSource" VerticalAlignment="Center" />
|
|
<ToggleButton Grid.Column="2" x:Name="_checkBoxPortVisible" VerticalAlignment="Center">
|
|
<Viewbox StretchDirection="Both" Stretch="Uniform" Width="16" Height="16">
|
|
<Grid Width="20" Height="20">
|
|
<Ellipse x:Name="_ellipse" HorizontalAlignment="Left" VerticalAlignment="Center" Height="15" Width="15">
|
|
<Ellipse.Fill>
|
|
<SolidColorBrush Color="#505050" />
|
|
</Ellipse.Fill>
|
|
</Ellipse>
|
|
<Path x:Name="_path" Data="M 0 0 L 4 4 L 0 8 Z" HorizontalAlignment="Right" VerticalAlignment="Center" Height="8" Width="4">
|
|
<Path.Fill>
|
|
<SolidColorBrush Color="#505050" />
|
|
</Path.Fill>
|
|
</Path>
|
|
</Grid>
|
|
</Viewbox>
|
|
<ToggleButton.Triggers>
|
|
<EventTrigger RoutedEvent="ToggleButton.Checked">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetName="_ellipse"
|
|
Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
|
|
Duration="0:0:0.2" From="#505050" To="White" />
|
|
<ColorAnimation Storyboard.TargetName="_path"
|
|
Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)"
|
|
Duration="0:0:0.2" From="#505050" To="White" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetName="_ellipse"
|
|
Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
|
|
Duration="0:0:0.2" From="White" To="#505050" />
|
|
<ColorAnimation Storyboard.TargetName="_path"
|
|
Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)"
|
|
Duration="0:0:0.2" From="White" To="#505050" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</ToggleButton.Triggers>
|
|
</ToggleButton>
|
|
</Grid>
|
|
</UserControl>
|