如何更改代码中窗口的宽度

本文关键字:窗口 何更改 代码 | 更新日期: 2023-09-27 17:58:54

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Name="W_win_rp" Background="Bisque" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="350" d:DesignWidth="525" SizeToContent="WidthAndHeight">

如何在运行时更改代码内部的设计宽度?

如何更改代码中窗口的宽度

设计宽度和高度用于设计而非运行时

要更改窗口的宽度和高度,只需使用这宽度和这个。高度