<Window x:Class="WpfApp2.Control.Label"
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:WpfApp2.Control"
mc:Ignorable="d"
Title="Label" Height="450" Width="800">
<Grid>
<!-- 高度为Height
内容为Content
水平方向排列设置 HorizontalAlignment
垂直方向排列设置VerticalAlignment
外边距使用 Margin 四个数字对应左,上,右,下
两个数字代表 左右 ,上下-->
<Label Width="100" Height="30"
Content="i am label 控件"
HorizontalAlignment="Right"
VerticalAlignment="Top" Margin="100,10" Foreground="Red"/>
</Grid>
</Window>