1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:LRH.Controls">
- <Style TargetType="Button" x:Key="MenuButton">
- <Setter Property="Width" Value="20"/>
- <Setter Property="Height" Value="20"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Opacity" Value="0.3"></Setter>
- <Setter Property="Background" Value="White"/>
- <Setter Property="Foreground" Value="OrangeRed"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style TargetType="Button" x:Key="{x:Static local:WindowBase.CloseButtonStyleKey}" BasedOn="{StaticResource MenuButton}">
- <Setter Property="ToolTip" Value="关闭"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border Name="bdPanel" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
- <TextBlock Name="txtContent" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="×"></TextBlock>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Opacity" Value="0.5"></Setter>
- <Setter Property="Background" Value="Red"/>
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style TargetType="Button" x:Key="{x:Static local:WindowBase.RestoreButtonKey}" BasedOn="{StaticResource MenuButton}">
- <Setter Property="ToolTip" Value="还原"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border Name="bdPanel" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
- <TextBlock Name="txtContent" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="❐"></TextBlock>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="Button" x:Key="{x:Static local:WindowBase.MinButtonStyleKey}" BasedOn="{StaticResource MenuButton}">
- <Setter Property="ToolTip" Value="最小化"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border Name="bdPanel" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
- <TextBlock Name="txtContent" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="-"></TextBlock>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="Button" x:Key="{x:Static local:WindowBase.MaxButtonStyleKey}" BasedOn="{StaticResource MenuButton}">
- <Setter Property="ToolTip" Value="最大化"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border Name="bdPanel" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
- <TextBlock Name="txtContent" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="□"></TextBlock>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|