为什么我看不到源和编译之间的大小WPF形式的平等? 我的意思是状态栏和按钮在图像之间看起来不同。他们有不同的立场。编译前的第一张图片。之后的第二张图片。大小主窗口
我该怎么做?
对不起初学者的问题。
<Window x:Class="WebDownloader.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WebDownloader"
mc:Ignorable="d"
Title="MainWindow" Initialized="Window_Initialized" Closed="Window_Closed" ResizeMode="NoResize" Height="190" Width="225.395">
<Grid>
<Button x:Name="MainButton" Content="Done" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="135,108,0,0" Click="MainButton_Click" FontFamily="Times New Roman"/>
<StatusBar HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,133,0,0" Width="209" Height="18" FontFamily="Times New Roman">
<StatusBarItem Content="StatusBarItem" Height="18" VerticalAlignment="Top" FontFamily="Times New Roman" Width="78" HorizontalAlignment="Left"/>
</StatusBar>
</Grid>
您将对齐方式设置为“左”和“上”,但将其定位在窗口的右下角。 – JMK
您是否检查过设计师的缩放级别? –
谢谢大家。对不起,这个愚蠢的问题。我得到了JMK的建议。我没有注意到它自己。 – Kirill