Skip to content

Commit

Permalink
feat: MahApps#4362 adapt window to new controlzex window chrome version
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Feb 2, 2023
1 parent 7b50db6 commit 5da313e
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
Title="Flyouts Demo"
Width="800"
Height="600"
BorderBrush="{DynamicResource MahApps.Brushes.Accent}"
BorderThickness="1"
SaveWindowPosition="True"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
MinWidth="700"
MinHeight="500"
d:DataContext="{d:DesignInstance local:MainWindowViewModel}"
BorderBrush="{DynamicResource MahApps.Brushes.Accent}"
BorderThickness="1"
IconOverlayBehavior="Never"
SaveWindowPosition="True"
TitleCharacterCasing="Normal"
Expand Down Expand Up @@ -499,7 +497,12 @@
SelectedValue="{Binding ElementName=ThisView, Path=IconOverlayBehavior, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Grid>

<CheckBox Content="ShowTitleBar" IsChecked="{Binding ElementName=ThisView, Path=ShowTitleBar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="ShowTitleBar"
IsChecked="{Binding ElementName=ThisView, Path=ShowTitleBar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MahApps.Styles.CheckBox.Win10}" />
<CheckBox Content="IsWindowDraggable"
IsChecked="{Binding ElementName=ThisView, Path=IsWindowDraggable, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MahApps.Styles.CheckBox.Win10}" />

<Button Margin="2 10 2 2"
Click="ShowLeft"
Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/Controls/MetroWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1239,12 +1239,12 @@ private void MetroWindow_SizeChanged(object sender, RoutedEventArgs e)
{
this.titleBar.SetCurrentValue(MarginProperty, default(Thickness));
Grid.SetColumn(this.titleBar, 0);
Grid.SetColumnSpan(this.titleBar, 5);
Grid.SetColumnSpan(this.titleBar, 3);
}
else
{
this.titleBar.SetCurrentValue(MarginProperty, new Thickness(leftWindowCommandsWidth, 0, rightWindowCommandsWidth, 0));
Grid.SetColumn(this.titleBar, 2);
Grid.SetColumn(this.titleBar, 1);
Grid.SetColumnSpan(this.titleBar, 1);
}
}
Expand Down
Loading

0 comments on commit 5da313e

Please sign in to comment.