You can set Width
and Height
of the window according to the device's dispaly resolution, you can set it like below:
<Window x:Class="WPFScale.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFScale"
mc:Ignorable="d"
Width="{x:Static SystemParameters.PrimaryScreenWidth}"
Height="{x:Static SystemParameters.PrimaryScreenHeight}"
Title="MainWindow">
<Grid>
</Grid>
</Window>
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.