Made window 1280x720 excluding chrome

This commit is contained in:
Assistant 2020-02-25 00:31:40 -07:00
parent 92e8fcf77b
commit ae1387b695
2 changed files with 11 additions and 1 deletions

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ModAssistant"
mc:Ignorable="d"
Icon="Resources/icon.ico"
Title="{DynamicResource MainWindow:WindowTitle}" Width="1280" Height="720"
Title="{DynamicResource MainWindow:WindowTitle}"
SizeChanged="Window_SizeChanged"
UIElement.PreviewMouseDown="Window_PreviewMouseDown">
<Grid>

View file

@ -39,6 +39,16 @@ namespace ModAssistant
InitializeComponent();
Instance = this;
const int ContentWidth = 1280;
const int ContentHeight = 720;
double ChromeWidth = SystemParameters.WindowNonClientFrameThickness.Left + SystemParameters.WindowNonClientFrameThickness.Right;
double ChromeHeight = SystemParameters.WindowNonClientFrameThickness.Top + SystemParameters.WindowNonClientFrameThickness.Bottom;
double ResizeBorder = SystemParameters.ResizeFrameVerticalBorderWidth;
Width = ChromeWidth + ContentWidth + 2 * ResizeBorder;
Height = ChromeHeight + ContentHeight + 2 * ResizeBorder;
VersionText.Text = App.Version;
if (Utils.IsVoid())