Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net WPF窗口在运行时压缩_.net_Wpf_Visual Studio 2010_Window_Designer - Fatal编程技术网

.net WPF窗口在运行时压缩

.net WPF窗口在运行时压缩,.net,wpf,visual-studio-2010,window,designer,.net,Wpf,Visual Studio 2010,Window,Designer,我在VisualStudio2010中设计了一个WPF窗口,其中包含几个控件。该窗口设置为程序启动的默认窗口。此窗口的大小足以使所有控件正确安装 当我执行程序时,由于某种原因,窗口开始时比designer中显示的大小小得多,并且控件不适合。如何解决这个问题 开窗代码如下: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200

我在VisualStudio2010中设计了一个WPF窗口,其中包含几个控件。该窗口设置为程序启动的默认窗口。此窗口的大小足以使所有控件正确安装

当我执行程序时,由于某种原因,窗口开始时比designer中显示的大小小得多,并且控件不适合。如何解决这个问题

开窗代码如下:

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" 
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
Title="Main"  mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="548" d:DesignWidth="924" SizeToContent="WidthAndHeight" xmlns:my="clr-namespace:ElanceTracker" WindowStartupLocation="CenterScreen" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar" xmlns:dxca="http://schemas.devexpress.com/winfx/2008/xaml/carousel" xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts">

尝试分别更改高度和宽度的DesignHeight和DesignWidth,并将SizeToContent设置为None。

尝试分别更改高度和宽度的DesignHeight和DesignWidth,并将SizeToContent设置为None。

您使用了错误的属性。DesignWidth和DesignHeight仅设置设计时间大小。您需要宽度和高度。

您使用了错误的属性。DesignWidth和DesignHeight仅设置设计时间大小。你想要宽度和高度。

你能给我们看xaml
Window
opening标签吗?刚刚添加到原始问题中。你能给我们看xaml
Window
opening标签吗?刚刚添加到原始问题中。我第一次使用WPF时经常遇到这种情况:)我第一次使用WPF时经常遇到这种情况:)