Skip to content

Commit

Permalink
Merge pull request #34 from WPFDevelopersOrg/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
yanjinhuagood authored May 14, 2023
2 parents df3c6f0 + 256a99a commit 5759fbd
Show file tree
Hide file tree
Showing 160 changed files with 11,432 additions and 10,192 deletions.
24 changes: 12 additions & 12 deletions src/WPFDevelopers.Net40/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<converts:ObjectNullToVisibilityConverter x:Key="ObjectNullToVisibilityConverter"/>

<Style TargetType="{x:Type wpfdev:Window}" BasedOn="{x:Null}">
<Setter Property="Foreground" Value="{DynamicResource WindowForegroundColorBrush}" />
<Setter Property="Background" Value="{DynamicResource BackgroundSolidColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource WindowBorderBrushSolidColorBrush}" />
<Setter Property="Foreground" Value="{DynamicResource WD.WindowForegroundColorBrush}" />
<Setter Property="Background" Value="{DynamicResource WD.BackgroundSolidColorBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource WD.WindowBorderBrushSolidColorBrush}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
<Setter Property="WindowStyle" Value="None" />
<Setter Property="MaxHeight" Value="{x:Static SystemParameters.MaximizedPrimaryScreenHeight}"/>
<Setter Property="FontFamily" Value="{DynamicResource NormalFontFamily}" />
<Setter Property="FontFamily" Value="{DynamicResource WD.NormalFontFamily}" />
<Setter Property="shell:WindowChrome.WindowChrome">
<Setter.Value>
<shell:WindowChrome GlassFrameThickness="0,0,0,.1"
Expand Down Expand Up @@ -49,48 +49,48 @@
Visibility="{TemplateBinding Icon,Converter={StaticResource ObjectNullToVisibilityConverter}}"/>
<TextBlock Text="{TemplateBinding Title}" x:Name="PART_Title" Margin="6,0"
Foreground="{TemplateBinding Foreground}" Grid.Column="1"
VerticalAlignment="Center" FontSize="{DynamicResource TitleFontSize}"/>
VerticalAlignment="Center" FontSize="{DynamicResource WD.TitleFontSize}"/>
<WrapPanel Grid.Column="2" shell:WindowChrome.IsHitTestVisibleInChrome="True"
Margin="0,6">
<WrapPanel x:Name="PART_MinAndMax">
<Button Name="PART_MinimizeButton" IsTabStop="False" Padding="0"
Style="{DynamicResource WindowButtonStyle}"
Style="{DynamicResource WD.WindowButtonStyle}"
Command="{Binding Source={x:Static shell:SystemCommands.MinimizeWindowCommand}}">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Rectangle x:Name="MinimizeGlyph" Width="10" Height="1" Margin="0 7 0 0"
VerticalAlignment="Bottom" Fill="{TemplateBinding Foreground}" />
</Grid>
</Button>
<Button Name="PART_MaximizeButton" IsTabStop="False" Padding="0"
Style="{DynamicResource WindowButtonStyle}"
Style="{DynamicResource WD.WindowButtonStyle}"
Command="{Binding Source={x:Static shell:SystemCommands.MaximizeWindowCommand}}">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Width="10" Height="10"
HorizontalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource PathMetroWindowMaximize}" Fill="{TemplateBinding Foreground}"
Data="{DynamicResource WD.WindowMaximizeGeometry}" Fill="{TemplateBinding Foreground}"
Stretch="Fill" UseLayoutRounding="False" />
</Grid>
</Button>
<Button Name="PART_RestoreButton" IsTabStop="False" Padding="0"
Style="{DynamicResource WindowButtonStyle}"
Style="{DynamicResource WD.WindowButtonStyle}"
Command="{Binding Source={x:Static shell:SystemCommands.RestoreWindowCommand}}"
Visibility="Collapsed">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Width="10" Height="10"
HorizontalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource PathMetroWindowRestore}" Fill="{TemplateBinding Foreground}"
Data="{DynamicResource WD.WindowRestoreGeometry}" Fill="{TemplateBinding Foreground}"
Stretch="Fill" UseLayoutRounding="False" />
</Grid>
</Button>
</WrapPanel>

<Button Name="PART_CloseButton"
IsTabStop="False" Style="{DynamicResource WindowButtonStyle}"
IsTabStop="False" Style="{DynamicResource WD.WindowButtonStyle}"
Command="{Binding Source={x:Static shell:SystemCommands.CloseWindowCommand}}">
<Path Width="10" Height="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{DynamicResource PathMetroWindowClose}"
Data="{DynamicResource WD.WindowCloseGeometry}"
Fill="{TemplateBinding Foreground}"
Stretch="Fill" />
</Button>
Expand Down
Loading

0 comments on commit 5759fbd

Please sign in to comment.