1,由于项目要求需要使用绝对定位
window:宽度:500 高度:300 + Canvas为容器控件,用于定位
<Window x:Class="WindowsHeight.Views.PrismWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
Loaded="Window_Loaded"
Title="{Binding Title}"
prism:ViewModelLocator.AutoWireViewModel="True"
Width="500"
Height="350">
<Canvas Background="Bisque" x:Name="canvas">
<Label Canvas.Top="10" x:Name="lx1" Canvas.Left="60" Height="30" Width="100" BorderBrush="Red" Content="定义宽度: