|
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"> |
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 x:Key="WPFDevelopersWindow" TargetType="{x:Type wpfdev:Window}" BasedOn="{x:Null}"> |
| 639 | + <Style x:Key="WPFDevelopersWindow" 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}" />
|
643 | 643 | <Setter Property="BorderThickness" Value="1" />
|
644 | 644 | <Setter Property="IsTabStop" Value="False" />
|
645 |
| - <!--<Setter Property="ResizeMode" Value="CanResizeWithGrip" />--> |
646 | 645 | <Setter Property="SnapsToDevicePixels" Value="True" />
|
647 | 646 | <Setter Property="UseLayoutRounding" Value="True" />
|
648 | 647 | <Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
|
|
652 | 651 | <Setter Property="FontFamily" Value="{DynamicResource WD.NormalFontFamily}" />
|
653 | 652 | <Setter Property="WindowChrome.WindowChrome">
|
654 | 653 | <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" /> |
656 | 655 | </Setter.Value>
|
657 | 656 | </Setter>
|
658 | 657 | <Setter Property="Template">
|
659 | 658 | <Setter.Value>
|
660 | 659 | <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}"> |
663 | 662 | <Grid.RowDefinitions>
|
664 | 663 | <RowDefinition Height="Auto" />
|
665 | 664 | <RowDefinition Height="*" />
|
|
670 | 669 | <ColumnDefinition Width="*" />
|
671 | 670 | <ColumnDefinition Width="Auto" MinWidth="30" />
|
672 | 671 | </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,
 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"> |
676 | 675 | <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}"> |
678 | 677 | <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}" /> |
680 | 679 | </Grid>
|
681 | 680 | </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}"> |
683 | 682 | <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
684 | 683 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowMaximizeGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
|
685 | 684 | </Grid>
|
686 | 685 | </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"> |
688 | 687 | <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
689 | 688 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowRestoreGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" UseLayoutRounding="False" />
|
690 | 689 | </Grid>
|
691 | 690 | </Button>
|
692 | 691 | </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}"> |
694 | 693 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{DynamicResource WD.WindowCloseGeometry}" Fill="{TemplateBinding Foreground}" Stretch="Fill" />
|
695 | 694 | </Button>
|
696 | 695 | </WrapPanel>
|
697 | 696 | </Grid>
|
698 | 697 | <AdornerDecorator Grid.Row="1" KeyboardNavigation.IsTabStop="False">
|
699 | 698 | <ContentPresenter x:Name="MainContentPresenter" ClipToBounds="True" />
|
700 | 699 | </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" /> |
702 | 701 | </Grid>
|
703 | 702 | </Border>
|
704 | 703 | <ControlTemplate.Triggers>
|
705 | 704 | <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" /> |
709 | 708 | </Trigger>
|
710 | 709 | <Trigger Property="WindowStyle" Value="ToolWindow">
|
711 | 710 | <Setter TargetName="PART_MinAndMax" Property="Visibility" Value="Collapsed" />
|
|
717 | 716 | </MultiTrigger.Conditions>
|
718 | 717 | <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
|
719 | 718 | </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>--> |
727 | 719 | </ControlTemplate.Triggers>
|
728 | 720 | </ControlTemplate>
|
729 | 721 | </Setter.Value>
|
|
1502 | 1494 | </Style.Triggers>
|
1503 | 1495 | </Style>
|
1504 | 1496 | <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}" /> |
1512 | 1497 | <Style x:Key="WD.DefaultHyperlink" TargetType="{x:Type Hyperlink}">
|
1513 | 1498 | <Setter Property="FontSize" Value="{StaticResource WD.NormalFontSize}" />
|
1514 | 1499 | <Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
|
|
3634 | 3619 | <Setter Property="UseLayoutRounding" Value="True" />
|
3635 | 3620 | <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
3636 | 3621 | <Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
|
3637 |
| - <Setter Property="WindowStyle" Value="None" /> |
| 3622 | + <Setter Property="WindowStyle" Value="ToolWindow" /> |
3638 | 3623 | <Setter Property="FontFamily" Value="{StaticResource WD.NormalFontFamily}" />
|
3639 | 3624 | <Setter Property="Template">
|
3640 | 3625 | <Setter.Value>
|
|
3649 | 3634 | <controls:SmallPanel Grid.Row="0">
|
3650 | 3635 | <DockPanel Margin="20,0,0,0">
|
3651 | 3636 | <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}"> |
3653 | 3638 | <Path Width="10" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Data="{StaticResource WD.WindowCloseGeometry}" Fill="{DynamicResource WD.PrimaryTextSolidColorBrush}" Stretch="Fill" />
|
3654 | 3639 | </Button>
|
3655 | 3640 | </DockPanel>
|
|
3803 | 3788 | </Setter>
|
3804 | 3789 | </Style>
|
3805 | 3790 | <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}"> |
3807 | 3792 | <Setter Property="HorizontalContentAlignment" Value="Left" />
|
3808 | 3793 | <Setter Property="VerticalContentAlignment" Value="Top" />
|
3809 | 3794 | <Setter Property="Foreground" Value="{DynamicResource WD.PrimaryTextSolidColorBrush}" />
|
3810 | 3795 | <Setter Property="Template">
|
3811 | 3796 | <Setter.Value>
|
3812 | 3797 | <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}" /> |
3815 | 3800 | </Border>
|
3816 | 3801 | </ControlTemplate>
|
3817 | 3802 | </Setter.Value>
|
|
0 commit comments