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>