0
我试图在我的xaml页面上添加一个标题,位于4x4网格上方的小空间中,但是当我尝试添加标签时,它说内容设置了多次。内容属性不止一次设置
这里是我的代码:
<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>