How do i change the width of window inside the code?
<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
精彩评论