Adjust the wpf application adapt to the screen size

<Window x:Class="YourApplication.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="YourApplication" 
    Height="{Binding SystemParameters.PrimaryScreenHeight}" 
    Width="{Binding SystemParameters.PrimaryScreenWidth}">

 

posted @ 2020-10-14 14:17  FredGrit  阅读(73)  评论(0编辑  收藏  举报