从设计模式和运行时改变WPF的窗口大小

时间:2014-07-13 13:29:06

标签: c# wpf

在Visual Express C#WPF中设计应用程序时,我的窗口大小会发生变化。在“设计”模式下,一切都按照需要设置,但在运行时窗口会失去一些宽度和高度?

我在下面添加了一行代码,用于设置主窗口。

<Window x:Class="CSVConvert.MainWindow" 
        xmlns="schemas.microsoft.com/winfx/2006/xaml/presentation"; 
        xmlns:x="schemas.microsoft.com/winfx/2006/xaml"; 
        Title="MainWindow" Height="350" Width="460" ResizeMode="NoResize">

调试: enter image description here

运行时: enter image description here

另一个可能解释偏移的screendump。主窗口和网格中具有相同大小的新项目

新项目: enter image description here

有什么想法可以解决这个问题吗?

感谢

0 个答案:

没有答案