我在 WPF 中设计了一个窗口,左侧有一个图像,图像旁边有两个按钮。我将其设置WindowState
为Maximized
.
但是在运行应用程序时,黑白控件的差距变大了。我想要在设计时进行对齐。就windows application
其现状而言,wpf
控件会自动对齐。
请帮我这样做,我是 wpf 的新手。能Panels
解决这个问题吗?
样品
<Window x:Class="AnalogCalibrationTool.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Analog Hardware Calibration Tool"
Height="500"
Width="700"
WindowStartupLocation="CenterScreen"
WindowStyle="SingleBorderWindow"
WindowState="Maximized"
ResizeMode="NoResize" SnapsToDevicePixels="True">
<Grid>
<Image HorizontalAlignment="Left" Margin="84.436,164.428,0,147.763" Name="image1" Stretch="Fill" Width="200" />
<Button Height="23" Margin="326.634,0,276.639,147.763" Name="button1" VerticalAlignment="Bottom">Button</Button>
<Button Height="29.997" HorizontalAlignment="Right" Margin="0,0,184.426,144.264" Name="button2" VerticalAlignment="Bottom" Width="75">Button</Button>
</Grid>
</Window>