我在Visual Studio 2010中创建了一个简单的界面。当我启动应用程序时,所有的东西都变得更大了。屏幕截图上的红色正方形代表启动应用程序中按钮的大小(右侧)。
我是否遗漏了什么?如何解决?
附言: 在“Microsoft Expression Blend 4”中,与编辑器中完全相同的项目大小。
附言: 在“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>