2013-02-21 01:33:05 +00:00
|
|
|
<UserControl x:Class="MediaBrowser.UI.Controls.WindowCommands"
|
|
|
|
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="300" d:DesignWidth="300">
|
|
|
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
|
|
|
<Style TargetType="StackPanel" x:Key="WindowCommandsPanel">
|
|
|
|
<Setter Property="Orientation" Value="Horizontal"/>
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="WebdingsButton">
|
|
|
|
<Setter Property="Margin" Value="0 0 15 0"/>
|
|
|
|
<Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
|
|
|
|
<Setter Property="Padding" Value="0"/>
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
<Style.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
<Setter Property="Opacity" Value=".5" />
|
|
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="TextBlock" x:Key="WebdingsTextBlock">
|
|
|
|
<Setter Property="FontFamily" Value="Webdings"/>
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="MinimizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
|
|
|
|
<Setter Property="ToolTip" Value="Minimize"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate>
|
|
|
|
<TextBlock Style="{StaticResource WebdingsTextBlock}">0</TextBlock>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="MaximizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
|
|
|
|
<Setter Property="ToolTip" Value="Maximize"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate>
|
|
|
|
<TextBlock Style="{StaticResource WebdingsTextBlock}">1</TextBlock>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="Maximized">
|
|
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="UndoMaximizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
<Setter Property="ToolTip" Value="Restore"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate>
|
|
|
|
<TextBlock Style="{StaticResource WebdingsTextBlock}">2</TextBlock>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
<Style.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="Maximized">
|
|
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
|
|
</DataTrigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="CloseApplicationButton" BasedOn="{StaticResource WebdingsButton}">
|
|
|
|
<Setter Property="ToolTip" Value="Close"/>
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate>
|
|
|
|
<TextBlock Style="{StaticResource WebdingsTextBlock}">r</TextBlock>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
<StackPanel Style="{StaticResource WindowCommandsPanel}">
|
|
|
|
<Button x:Name="MinimizeApplicationButton" Style="{StaticResource MinimizeApplicationButton}">
|
|
|
|
</Button>
|
|
|
|
<Button x:Name="MaximizeApplicationButton" Style="{StaticResource MaximizeApplicationButton}">
|
|
|
|
</Button>
|
|
|
|
<Button x:Name="UndoMaximizeApplicationButton" Style="{StaticResource UndoMaximizeApplicationButton}"></Button>
|
|
|
|
<Button x:Name="CloseApplicationButton" Style="{StaticResource CloseApplicationButton}"></Button>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
</UserControl>
|