Skip to content

Commit

Permalink
Removed WindowChrome from main window
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorgan001 committed Mar 27, 2022
1 parent bba956a commit 25d96fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 4 additions & 12 deletions GS.Server/Main/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@
Width="{Binding WindowWidth, Mode=TwoWay}"
Left="{Binding WindowLeft, Mode=TwoWay}"
Top="{Binding WindowTop, Mode=TwoWay}"
MinHeight="100" MinWidth="200">
<WindowChrome.WindowChrome>
<WindowChrome
ResizeBorderThickness="6"
CaptionHeight="30"
CornerRadius="5,5,5,5"
GlassFrameThickness="1">
</WindowChrome>
</WindowChrome.WindowChrome>
MinHeight="100" MinWidth="200" AllowsTransparency="True">
<Window.Resources>
<DataTemplate DataType="{x:Type skyTelescope:SkyTelescopeVM}">
<skyTelescope:SkyTelescopeV />
Expand Down Expand Up @@ -79,13 +71,13 @@
</Window.TaskbarItemInfo>
<Grid Background="{DynamicResource MaterialDesignBody}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="30"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<controls:WindowTitleBar Grid.Row="0"/>
<controls:WindowTitleBar Grid.Row="0"/>
<controls:TabBar Grid.Row="1"/>
<Grid Grid.Row="2" Background="{DynamicResource MaterialDesignPaper}">
<Grid Grid.Row="2" Background="{DynamicResource MaterialDesignPaper}">
<ContentControl Content="{Binding CurrentPageViewModel}"/>
</Grid>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions GS.Server/Main/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ private void MainWindow_OnContentRendered(object sender, EventArgs e)
// Topmost = Properties.Server.Default.StartOnTop;
Memory.FlushMemory();
SetOnScreen(this);
MouseLeftButtonDown += delegate { DragMove(); };
}

protected override void OnStateChanged(EventArgs e)
{
base.OnStateChanged(e);

InvalidateMeasure();

}


/// <summary>
/// Make sure startup window is within the visible screen area
/// </summary>
Expand Down

0 comments on commit 25d96fd

Please sign in to comment.