Skip to content

Commit 14cdd37

Browse files
committed
Update Theme.xaml
1 parent 1a107e9 commit 14cdd37

File tree

1 file changed

+22
-37
lines changed

1 file changed

+22
-37
lines changed

src/WPFDevelopers.Net45x/Themes/Theme.xaml

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" po:Freeze="True" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:controls="clr-namespace:WPFDevelopers.Controls" xmlns:helpers="clr-namespace:WPFDevelopers.Helpers" xmlns:wpfdev="clr-namespace:WPFDevelopers.Net45x" xmlns:converts="clr-namespace:WPFDevelopers.Converts" xmlns:ec="clr-namespace:Microsoft.Expression.Controls" xmlns:drawingControls="clr-namespace:Microsoft.Expression.Drawing.Controls" xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" po:Freeze="True" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:controls="clr-namespace:WPFDevelopers.Controls" xmlns:helpers="clr-namespace:WPFDevelopers.Helpers" xmlns:converts="clr-namespace:WPFDevelopers.Converts" xmlns:wpfdev="clr-namespace:WPFDevelopers.Net45x" xmlns:ec="clr-namespace:Microsoft.Expression.Controls" xmlns:drawingControls="clr-namespace:Microsoft.Expression.Drawing.Controls" xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
22
<SolidColorBrush x:Key="WD.ButtonFocusVisualColor" po:Freeze="True" Color="#60000000" />
33
<Color x:Key="WD.ShadowDepthColor" po:Freeze="True">#AA000000</Color>
44
<Color x:Key="WD.PrimaryTextColor" po:Freeze="True">#909399</Color>
@@ -636,13 +636,12 @@
636636
</Setter>
637637
</Style>
638638
<Style BasedOn="{StaticResource WD.DefaultButton}" TargetType="{x:Type Button}" />
639-
<Style x:Key="WPFDevelopersWindow" TargetType="{x:Type wpfdev:Window}" BasedOn="{x:Null}">
639+
<Style x:Key="WPFDevelopersWindow" BasedOn="{x:Null}" TargetType="{x:Type wpfdev:Window}">
640640
<Setter Property="Foreground" Value="{DynamicResource WD.WindowForegroundColorBrush}" />
641641
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
642642
<Setter Property="BorderBrush" Value="{DynamicResource WD.WindowBorderBrushSolidColorBrush}" />
643643
<Setter Property="BorderThickness" Value="1" />
644644
<Setter Property="IsTabStop" Value="False" />
645-
<!--<Setter Property="ResizeMode" Value="CanResizeWithGrip" />-->
646645
<Setter Property="SnapsToDevicePixels" Value="True" />
647646
<Setter Property="UseLayoutRounding" Value="True" />
648647
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
@@ -652,14 +651,14 @@
652651
<Setter Property="FontFamily" Value="{DynamicResource WD.NormalFontFamily}" />
653652
<Setter Property="WindowChrome.WindowChrome">
654653
<Setter.Value>
655-
<WindowChrome GlassFrameThickness="0,0,0,.1" UseAeroCaptionButtons="False" CaptionHeight="{Binding TitleHeight,RelativeSource={RelativeSource AncestorType=wpfdev:Window}}" />
654+
<WindowChrome CaptionHeight="{Binding TitleHeight, RelativeSource={RelativeSource AncestorType=wpfdev:Window}}" GlassFrameThickness="0,0,0,.1" UseAeroCaptionButtons="False" />
656655
</Setter.Value>
657656
</Setter>
658657
<Setter Property="Template">
659658
<Setter.Value>
660659
<ControlTemplate TargetType="{x:Type wpfdev:Window}">
661-
<Border SnapsToDevicePixels="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
662-
<Grid Background="{TemplateBinding Background}" x:Name="LayoutRoot">
660+
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
661+
<Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
663662
<Grid.RowDefinitions>
664663
<RowDefinition Height="Auto" />
665664
<RowDefinition Height="*" />
@@ -670,42 +669,42 @@
670669
<ColumnDefinition Width="*" />
671670
<ColumnDefinition Width="Auto" MinWidth="30" />
672671
</Grid.ColumnDefinitions>
673-
<Image Source="{TemplateBinding Icon}" Stretch="Fill" VerticalAlignment="Center" HorizontalAlignment="Left" Width="30" Height="30" Margin="14,0,0,0" RenderOptions.BitmapScalingMode="HighQuality" Visibility="{TemplateBinding Icon,Converter={StaticResource ObjectNullToVisibilityConverter}}" />
674-
<TextBlock Text="{TemplateBinding Title}" x:Name="PART_Title" Margin="6,0" Foreground="{TemplateBinding Foreground}" Grid.Column="1" VerticalAlignment="Center" FontSize="{DynamicResource WD.TitleFontSize}" />
675-
<WrapPanel Grid.Column="2" WindowChrome.IsHitTestVisibleInChrome="True" Margin="0,6">
672+
<Image Width="30" Height="30" Margin="14,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" Source="{TemplateBinding Icon}" Stretch="Fill" Visibility="{TemplateBinding Icon,&#xD;&#xA; Converter={StaticResource ObjectNullToVisibilityConverter}}" />
673+
<TextBlock x:Name="PART_Title" Grid.Column="1" Margin="6,0" VerticalAlignment="Center" FontSize="{DynamicResource WD.TitleFontSize}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Title}" />
674+
<WrapPanel Grid.Column="2" Margin="0,6" WindowChrome.IsHitTestVisibleInChrome="True">
676675
<WrapPanel x:Name="PART_MinAndMax">
677-
<Button Name="PART_MinimizeButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="SystemCommands.MinimizeWindowCommand">
676+
<Button Name="PART_MinimizeButton" Padding="0" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
678677
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
679-
<Rectangle x:Name="MinimizeGlyph" Width="10" Height="1" Margin="0 7 0 0" VerticalAlignment="Bottom" Fill="{TemplateBinding Foreground}" />
678+
<Rectangle x:Name="MinimizeGlyph" Width="10" Height="1" Margin="0,7,0,0" VerticalAlignment="Bottom" Fill="{TemplateBinding Foreground}" />
680679
</Grid>
681680
</Button>
682-
<Button Name="PART_MaximizeButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="SystemCommands.MaximizeWindowCommand">
681+
<Button Name="PART_MaximizeButton" Padding="0" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
683682
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
684683
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowMaximizeGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
685684
</Grid>
686685
</Button>
687-
<Button Name="PART_RestoreButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="SystemCommands.RestoreWindowCommand" Visibility="Collapsed">
686+
<Button Name="PART_RestoreButton" Padding="0" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" Visibility="Collapsed">
688687
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
689688
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowRestoreGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
690689
</Grid>
691690
</Button>
692691
</WrapPanel>
693-
<Button Name="PART_CloseButton" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" Command="SystemCommands.CloseWindowCommand">
692+
<Button Name="PART_CloseButton" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
694693
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowCloseGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" />
695694
</Button>
696695
</WrapPanel>
697696
</Grid>
698697
<AdornerDecorator Grid.Row="1" KeyboardNavigation.IsTabStop="False">
699698
<ContentPresenter x:Name="MainContentPresenter" ClipToBounds="True" />
700699
</AdornerDecorator>
701-
<ResizeGrip x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed" />
700+
<ResizeGrip x:Name="ResizeGrip" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsTabStop="False" Visibility="Collapsed" />
702701
</Grid>
703702
</Border>
704703
<ControlTemplate.Triggers>
705704
<Trigger Property="WindowState" Value="Maximized">
706-
<Setter Property="Visibility" Value="Visible" TargetName="PART_RestoreButton" />
707-
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_MaximizeButton" />
708-
<Setter Property="Margin" TargetName="LayoutRoot" Value="7" />
705+
<Setter TargetName="PART_RestoreButton" Property="Visibility" Value="Visible" />
706+
<Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" />
707+
<Setter TargetName="LayoutRoot" Property="Margin" Value="7" />
709708
</Trigger>
710709
<Trigger Property="WindowStyle" Value="ToolWindow">
711710
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
@@ -717,13 +716,6 @@
717716
</MultiTrigger.Conditions>
718717
<Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
719718
</MultiTrigger>
720-
<!--<MultiTrigger>
721-
<MultiTrigger.Conditions>
722-
<Condition Property="ResizeMode" Value="NoResize" />
723-
<Condition Property="WindowStyle" Value="ToolWindow" />
724-
</MultiTrigger.Conditions>
725-
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
726-
</MultiTrigger>-->
727719
</ControlTemplate.Triggers>
728720
</ControlTemplate>
729721
</Setter.Value>
@@ -1502,13 +1494,6 @@
15021494
</Style.Triggers>
15031495
</Style>
15041496
<Style BasedOn="{StaticResource DefaultSlider}" TargetType="{x:Type Slider}" />
1505-
<Style x:Key="WD.DefaultTextBlock" TargetType="{x:Type TextBlock}">
1506-
<Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
1507-
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
1508-
<Setter Property="FontStyle" Value="{StaticResource WD.NormalFontStyle}" />
1509-
<Setter Property="FontStretch" Value="{StaticResource WD.NormalFontStretch}" />
1510-
</Style>
1511-
<Style BasedOn="{StaticResource WD.DefaultTextBlock}" TargetType="{x:Type TextBlock}" />
15121497
<Style x:Key="WD.DefaultHyperlink" TargetType="{x:Type Hyperlink}">
15131498
<Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
15141499
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
@@ -3634,7 +3619,7 @@
36343619
<Setter Property="UseLayoutRounding" Value="True" />
36353620
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
36363621
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
3637-
<Setter Property="WindowStyle" Value="None" />
3622+
<Setter Property="WindowStyle" Value="ToolWindow" />
36383623
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
36393624
<Setter Property="Template">
36403625
<Setter.Value>
@@ -3649,7 +3634,7 @@
36493634
<controls:SmallPanel Grid.Row="0">
36503635
<DockPanel Margin="20,0,0,0">
36513636
<TextBlock x:Name="PART_Title" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource WD.TitleFontSize}" Foreground="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
3652-
<Button Name="PART_CloseButton" Margin="0,6" HorizontalAlignment="Right" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" ToolTip="Close">
3637+
<Button Name="PART_CloseButton" Margin="0,6" HorizontalAlignment="Right" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
36533638
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{StaticResource WD.WindowCloseGeometry}" Fill="{DynamicResource WD.PrimaryTextSolidColorBrush}" Stretch="Fill" />
36543639
</Button>
36553640
</DockPanel>
@@ -3803,15 +3788,15 @@
38033788
</Setter>
38043789
</Style>
38053790
<Style BasedOn="{StaticResource DefaultGridSplitter}" TargetType="{x:Type GridSplitter}" />
3806-
<Style x:Key="WD.DefaultLabel" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type Label}">
3791+
<Style x:Key="WD.DefaultLabel" TargetType="{x:Type Label}">
38073792
<Setter Property="HorizontalContentAlignment" Value="Left" />
38083793
<Setter Property="VerticalContentAlignment" Value="Top" />
38093794
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
38103795
<Setter Property="Template">
38113796
<Setter.Value>
38123797
<ControlTemplate TargetType="{x:Type Label}">
3813-
<Border>
3814-
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
3798+
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
3799+
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
38153800
</Border>
38163801
</ControlTemplate>
38173802
</Setter.Value>

0 commit comments

Comments
 (0)