WPF UI页面等比例放大
作者:互联网
WPF UI页面等比例放大
在界面设计时,采用 Canvas,通过绝对定位来设计控件,而不是用Margin
<Grid>
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top" VerticalAlignment="Top" />
<Viewbox Stretch="Fill" >
<Canvas HorizontalAlignment="Left" Height="442" VerticalAlignment="Top" Width="794" Background="GhostWhite">
<Label Content="Button" Canvas.Left="161" Canvas.Top="117" Width="65"/>
</Canvas>
</Viewbox>
<StatusBar DockPanel.Dock="Bottom" Height="20" VerticalAlignment="Botton"/>
</DockPanel>
</Grid>
标签:界面设计,控件,UI,WPF,页面,放大 来源: https://blog.csdn.net/weixin_51441284/article/details/121264334