【发布时间】:2015-11-06 00:42:21
【问题描述】:
我正在尝试在 4x4 网格上方的小空间中向我的 xaml 页面添加标题,但是当我尝试添加标签时,它显示内容已设置多次。
这是我的代码:
<Window x:Class="WpfApplicationAssignmentgood.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid Name="mainGrid" Margin="0,56,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
</Grid>
<Label Content="Hello" HorizontalAlignment="Center", VerticalAlignment="Center" FontFamily="Arial Black" FontSize="24" />
</Window>
【问题讨论】:
标签: xaml