|
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"> |
2 | 2 | <SolidColorBrush x:Key="WD.ButtonFocusVisualColor" po:Freeze="True" Color="#60000000" />
|
3 | 3 | <Color x:Key="WD.ShadowDepthColor" po:Freeze="True">#AA000000</Color>
|
4 | 4 | <Color x:Key="WD.PrimaryTextColor" po:Freeze="True">#909399</Color>
|
|
636 | 636 | </Setter>
|
637 | 637 | </Style>
|
638 | 638 | <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}"> |
640 | 640 | <Setter Property="Foreground" Value="{DynamicResource WD.WindowForegroundColorBrush}" />
|
641 | 641 | <Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
|
642 | 642 | <Setter Property="BorderBrush" Value="{DynamicResource WD.WindowBorderBrushSolidColorBrush}" />
|
|
650 | 650 | <Setter Property="FontFamily" Value="{DynamicResource WD.NormalFontFamily}" />
|
651 | 651 | <Setter Property="shell:WindowChrome.WindowChrome">
|
652 | 652 | <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" /> |
654 | 654 | </Setter.Value>
|
655 | 655 | </Setter>
|
656 | 656 | <Setter Property="Template">
|
657 | 657 | <Setter.Value>
|
658 | 658 | <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}"> |
661 | 661 | <Grid.RowDefinitions>
|
662 | 662 | <RowDefinition Height="Auto" />
|
663 | 663 | <RowDefinition Height="*" />
|
|
668 | 668 | <ColumnDefinition Width="*" />
|
669 | 669 | <ColumnDefinition Width="Auto" MinWidth="30" />
|
670 | 670 | </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,
 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"> |
674 | 674 | <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}"> |
676 | 676 | <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}" /> |
678 | 678 | </Grid>
|
679 | 679 | </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}"> |
681 | 681 | <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
682 | 682 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowMaximizeGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
|
683 | 683 | </Grid>
|
684 | 684 | </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"> |
686 | 686 | <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
687 | 687 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowRestoreGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
|
688 | 688 | </Grid>
|
689 | 689 | </Button>
|
690 | 690 | </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}"> |
692 | 692 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowCloseGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" />
|
693 | 693 | </Button>
|
694 | 694 | </WrapPanel>
|
695 | 695 | </Grid>
|
696 | 696 | <AdornerDecorator Grid.Row="1" KeyboardNavigation.IsTabStop="False">
|
697 | 697 | <ContentPresenter x:Name="MainContentPresenter" ClipToBounds="True" />
|
698 | 698 | </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" /> |
700 | 700 | </Grid>
|
701 | 701 | </Border>
|
702 | 702 | <ControlTemplate.Triggers>
|
703 | 703 | <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" /> |
708 | 707 | </Trigger>
|
709 | 708 | <Trigger Property="WindowStyle" Value="ToolWindow">
|
710 | 709 | <Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
|
|
716 | 715 | </MultiTrigger.Conditions>
|
717 | 716 | <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
|
718 | 717 | </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>--> |
726 | 718 | </ControlTemplate.Triggers>
|
727 | 719 | </ControlTemplate>
|
728 | 720 | </Setter.Value>
|
|
1501 | 1493 | </Style.Triggers>
|
1502 | 1494 | </Style>
|
1503 | 1495 | <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}" /> |
1511 | 1496 | <Style x:Key="WD.DefaultHyperlink" TargetType="{x:Type Hyperlink}">
|
1512 | 1497 | <Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
|
1513 | 1498 | <Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
|
|
3633 | 3618 | <Setter Property="UseLayoutRounding" Value="True" />
|
3634 | 3619 | <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
3635 | 3620 | <Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
|
3636 |
| - <Setter Property="WindowStyle" Value="None" /> |
| 3621 | + <Setter Property="WindowStyle" Value="ToolWindow" /> |
3637 | 3622 | <Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
|
3638 | 3623 | <Setter Property="Template">
|
3639 | 3624 | <Setter.Value>
|
|
3648 | 3633 | <controls:SmallPanel Grid.Row="0">
|
3649 | 3634 | <DockPanel Margin="20,0,0,0">
|
3650 | 3635 | <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}"> |
3652 | 3637 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{StaticResource WD.WindowCloseGeometry}" Fill="{DynamicResource WD.PrimaryTextSolidColorBrush}" Stretch="Fill" />
|
3653 | 3638 | </Button>
|
3654 | 3639 | </DockPanel>
|
|
3802 | 3787 | </Setter>
|
3803 | 3788 | </Style>
|
3804 | 3789 | <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}"> |
3806 | 3791 | <Setter Property="HorizontalContentAlignment" Value="Left" />
|
3807 | 3792 | <Setter Property="VerticalContentAlignment" Value="Top" />
|
3808 | 3793 | <Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
|
|
0 commit comments