Skip to content

Commit e44312b

Browse files
Merge pull request #51 from WPFDevelopersOrg/dev
dev merged into master
2 parents 10e177a + cb6a2aa commit e44312b

File tree

23 files changed

+681
-293
lines changed

23 files changed

+681
-293
lines changed

src/WPFDevelopers.Net40/Themes/Generic.xaml

Lines changed: 115 additions & 79 deletions
Large diffs are not rendered by default.

src/WPFDevelopers.Net40/Themes/Theme.xaml

Lines changed: 20 additions & 35 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:shell="clr-namespace:Microsoft.Windows.Shell" xmlns:wpfdev="clr-namespace:WPFDevelopers.Net40" 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:shell="clr-namespace:Microsoft.Windows.Shell" xmlns:wpfdev="clr-namespace:WPFDevelopers.Net40" 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,7 +636,7 @@
636636
</Setter>
637637
</Style>
638638
<Style BasedOn="{StaticResource WD.DefaultButton}" TargetType="{x:Type Button}" />
639-
<Style TargetType="{x:Type wpfdev:Window}" BasedOn="{x:Null}">
639+
<Style 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}" />
@@ -650,14 +650,14 @@
650650
<Setter Property="FontFamily" Value="{DynamicResource WD.NormalFontFamily}" />
651651
<Setter Property="shell:WindowChrome.WindowChrome">
652652
<Setter.Value>
653-
<shell:WindowChrome GlassFrameThickness="0,0,0,.1" CaptionHeight="{Binding TitleHeight,RelativeSource={RelativeSource AncestorType=wpfdev:Window}}" />
653+
<shell:WindowChrome CaptionHeight="{Binding TitleHeight, RelativeSource={RelativeSource AncestorType=wpfdev:Window}}" GlassFrameThickness="0,0,0,.1" />
654654
</Setter.Value>
655655
</Setter>
656656
<Setter Property="Template">
657657
<Setter.Value>
658658
<ControlTemplate TargetType="{x:Type wpfdev:Window}">
659-
<Border SnapsToDevicePixels="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
660-
<Grid Background="{TemplateBinding Background}" x:Name="LayoutRoot">
659+
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
660+
<Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
661661
<Grid.RowDefinitions>
662662
<RowDefinition Height="Auto" />
663663
<RowDefinition Height="*" />
@@ -668,43 +668,42 @@
668668
<ColumnDefinition Width="*" />
669669
<ColumnDefinition Width="Auto" MinWidth="30" />
670670
</Grid.ColumnDefinitions>
671-
<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}}" />
672-
<TextBlock Text="{TemplateBinding Title}" x:Name="PART_Title" Margin="6,0" Foreground="{TemplateBinding Foreground}" Grid.Column="1" VerticalAlignment="Center" FontSize="{DynamicResource WD.TitleFontSize}" />
673-
<WrapPanel Grid.Column="2" shell:WindowChrome.IsHitTestVisibleInChrome="True" Margin="0,6">
671+
<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}}" />
672+
<TextBlock x:Name="PART_Title" Grid.Column="1" Margin="6,0" VerticalAlignment="Center" FontSize="{DynamicResource WD.TitleFontSize}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Title}" />
673+
<WrapPanel Grid.Column="2" Margin="0,6" shell:WindowChrome.IsHitTestVisibleInChrome="True">
674674
<WrapPanel x:Name="PART_MinAndMax">
675-
<Button Name="PART_MinimizeButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="{Binding Source={x:Static shell:SystemCommands.MinimizeWindowCommand}}">
675+
<Button Name="PART_MinimizeButton" Padding="0" Command="{Binding Source={x:Static shell:SystemCommands.MinimizeWindowCommand}}" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
676676
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
677-
<Rectangle x:Name="MinimizeGlyph" Width="10" Height="1" Margin="0 7 0 0" VerticalAlignment="Bottom" Fill="{TemplateBinding Foreground}" />
677+
<Rectangle x:Name="MinimizeGlyph" Width="10" Height="1" Margin="0,7,0,0" VerticalAlignment="Bottom" Fill="{TemplateBinding Foreground}" />
678678
</Grid>
679679
</Button>
680-
<Button Name="PART_MaximizeButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="{Binding Source={x:Static shell:SystemCommands.MaximizeWindowCommand}}">
680+
<Button Name="PART_MaximizeButton" Padding="0" Command="{Binding Source={x:Static shell:SystemCommands.MaximizeWindowCommand}}" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
681681
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
682682
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowMaximizeGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
683683
</Grid>
684684
</Button>
685-
<Button Name="PART_RestoreButton" IsTabStop="False" Padding="0" Style="{DynamicResource WD.WindowButtonStyle}" Command="{Binding Source={x:Static shell:SystemCommands.RestoreWindowCommand}}" Visibility="Collapsed">
685+
<Button Name="PART_RestoreButton" Padding="0" Command="{Binding Source={x:Static shell:SystemCommands.RestoreWindowCommand}}" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" Visibility="Collapsed">
686686
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
687687
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowRestoreGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
688688
</Grid>
689689
</Button>
690690
</WrapPanel>
691-
<Button Name="PART_CloseButton" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" Command="{Binding Source={x:Static shell:SystemCommands.CloseWindowCommand}}">
691+
<Button Name="PART_CloseButton" Command="{Binding Source={x:Static shell:SystemCommands.CloseWindowCommand}}" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
692692
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowCloseGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" />
693693
</Button>
694694
</WrapPanel>
695695
</Grid>
696696
<AdornerDecorator Grid.Row="1" KeyboardNavigation.IsTabStop="False">
697697
<ContentPresenter x:Name="MainContentPresenter" ClipToBounds="True" />
698698
</AdornerDecorator>
699-
<ResizeGrip x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed" />
699+
<ResizeGrip x:Name="ResizeGrip" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsTabStop="False" Visibility="Collapsed" />
700700
</Grid>
701701
</Border>
702702
<ControlTemplate.Triggers>
703703
<Trigger Property="WindowState" Value="Maximized">
704-
<Setter Property="Visibility" Value="Visible" TargetName="PART_RestoreButton" />
705-
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_MaximizeButton" />
706-
<!--<Setter Property="BorderThickness" Value="{Binding Source={x:Static shell:SystemParameters2.Current}, Path=WindowResizeBorderThickness}"/>-->
707-
<Setter Property="Margin" TargetName="LayoutRoot" Value="7" />
704+
<Setter TargetName="PART_RestoreButton" Property="Visibility" Value="Visible" />
705+
<Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" />
706+
<Setter TargetName="LayoutRoot" Property="Margin" Value="7" />
708707
</Trigger>
709708
<Trigger Property="WindowStyle" Value="ToolWindow">
710709
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
@@ -716,13 +715,6 @@
716715
</MultiTrigger.Conditions>
717716
<Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
718717
</MultiTrigger>
719-
<!--<MultiTrigger>
720-
<MultiTrigger.Conditions>
721-
<Condition Property="ResizeMode" Value="NoResize" />
722-
<Condition Property="WindowStyle" Value="ToolWindow" />
723-
</MultiTrigger.Conditions>
724-
<Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
725-
</MultiTrigger>-->
726718
</ControlTemplate.Triggers>
727719
</ControlTemplate>
728720
</Setter.Value>
@@ -1501,13 +1493,6 @@
15011493
</Style.Triggers>
15021494
</Style>
15031495
<Style BasedOn="{StaticResource DefaultSlider}" TargetType="{x:Type Slider}" />
1504-
<Style x:Key="WD.DefaultTextBlock" TargetType="{x:Type TextBlock}">
1505-
<Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
1506-
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
1507-
<Setter Property="FontStyle" Value="{StaticResource WD.NormalFontStyle}" />
1508-
<Setter Property="FontStretch" Value="{StaticResource WD.NormalFontStretch}" />
1509-
</Style>
1510-
<Style BasedOn="{StaticResource WD.DefaultTextBlock}" TargetType="{x:Type TextBlock}" />
15111496
<Style x:Key="WD.DefaultHyperlink" TargetType="{x:Type Hyperlink}">
15121497
<Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
15131498
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
@@ -3633,7 +3618,7 @@
36333618
<Setter Property="UseLayoutRounding" Value="True" />
36343619
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
36353620
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
3636-
<Setter Property="WindowStyle" Value="None" />
3621+
<Setter Property="WindowStyle" Value="ToolWindow" />
36373622
<Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
36383623
<Setter Property="Template">
36393624
<Setter.Value>
@@ -3648,7 +3633,7 @@
36483633
<controls:SmallPanel Grid.Row="0">
36493634
<DockPanel Margin="20,0,0,0">
36503635
<TextBlock x:Name="PART_Title" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource WD.TitleFontSize}" Foreground="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
3651-
<Button Name="PART_CloseButton" Margin="0,6" HorizontalAlignment="Right" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}" ToolTip="Close">
3636+
<Button Name="PART_CloseButton" Margin="0,6" HorizontalAlignment="Right" IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}">
36523637
<Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{StaticResource WD.WindowCloseGeometry}" Fill="{DynamicResource WD.PrimaryTextSolidColorBrush}" Stretch="Fill" />
36533638
</Button>
36543639
</DockPanel>
@@ -3802,7 +3787,7 @@
38023787
</Setter>
38033788
</Style>
38043789
<Style BasedOn="{StaticResource DefaultGridSplitter}" TargetType="{x:Type GridSplitter}" />
3805-
<Style x:Key="WD.DefaultLabel" BasedOn="{StaticResource WD.ControlBasicStyle}" TargetType="{x:Type Label}">
3790+
<Style x:Key="WD.DefaultLabel" TargetType="{x:Type Label}">
38063791
<Setter Property="HorizontalContentAlignment" Value="Left" />
38073792
<Setter Property="VerticalContentAlignment" Value="Top" />
38083793
<Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />

0 commit comments

Comments
 (0)