我想創建網格到網格中。我嘗試了下面這段代碼,但這不起作用,有人知道爲什麼嗎?你有解決方案嗎?將網格劃分爲網格XAML
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ShowGridLines="true">
<Grid.Background>
<LinearGradientBrush>
<GradientStop Color="#EEE8AA" />
<GradientStop Color="#2F4F4F" Offset="1" />
</LinearGradientBrush>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="90*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*" />
<ColumnDefinition Width="80*" />
<ColumnDefinition Width="10*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100*" />
</Grid.RowDefinitions>
</Grid>
</Grid>
沒有錯代碼,嘗試加入一些內容到網格例如TextBlock等或只是爲了確保其工作,設置具有背景顏色的網格的寬度和高度。 – Zeshan
你是什麼意思「不起作用」? – har07