【发布时间】:2010-10-19 11:38:28
【问题描述】:
我在 Visual Studio 2010 中制作了简单的界面。当我启动应用程序时,一切都变得更大了。屏幕截图上的红色方块代表已启动应用程序中按钮的大小(右侧)。 我错过了什么吗?如何解决?
附: 在“Microsoft Expression Blend 4”中,相同的项目与编辑器中的大小完全相同。
<Window x:Class="WpfControlReview.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="120" Width="256" ResizeMode="NoResize">
<Grid>
<Button HorizontalAlignment="Stretch" Name="button1" VerticalAlignment="Stretch">
<StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Center">
<Label IsHitTestVisible="False" Content="Select your options and press to commit" Name="label1" HorizontalContentAlignment="Center" FontSize="12" />
<StackPanel Name="stackPanel2" Orientation="Horizontal">
<Expander Header="Color" Name="expander1">
</Expander>
<Expander Header="Make" Name="expander2">
</Expander>
<Expander Header="Payment" Name="expander3">
</Expander>
</StackPanel>
</StackPanel>
</Button>
</Grid>
</Window>
【问题讨论】:
-
一些代码会很有用~~~
-
你一定用的是64位机吧?
-
@Avatar 是的。有什么关系吗?
标签: c# .net wpf visual-studio-2010 size