开发者

How do i change the width of window inside the code?

开发者 https://www.devze.com 2023-03-12 14:10 出处:网络
<Window x:Class=\"WpfApplication1.M开发者_如何学PythonainWindow\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"
<Window x:Class="WpfApplication1.M开发者_如何学PythonainWindow"
        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">

How do i change this designwidth inside the code at runtime ?


Design width and height are for design not runtime

for changing Window's Width and Height simply use this.Width and this.Height

0

精彩评论

暂无评论...
验证码 换一张
取 消