Skip to content

Commit

Permalink
adjust automatically startup heigh and width
Browse files Browse the repository at this point in the history
  • Loading branch information
agailloty committed Feb 1, 2025
1 parent 53f5aa0 commit 733095e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xpathrunnerui/xpathrunnerui/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="xpathrunnerui.MainWindow"
Title="XPATH Runner" Width="750" Height="680"
Title="XPATH Runner"
Icon="/Assets/html_tag.png"
WindowStartupLocation="CenterScreen">

Expand Down
7 changes: 7 additions & 0 deletions xpathrunnerui/xpathrunnerui/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public partial class MainWindow : Window
public MainWindow()
{
InitializeComponent();
var screen = Screens.Primary;
// Set width and height as percentages of the screen
if (screen != null)
{
Width = screen.WorkingArea.Width * 0.5;
Height = screen.WorkingArea.Height * 0.6;
}
}

public async void PickFileHandler(object sender, RoutedEventArgs args)
Expand Down

0 comments on commit 733095e

Please sign in to comment.