上の48ピクセルをある色で、その下のすべてを別の色で背景を作成しようとしています。スタイルを作成しましたが、使用しようとすると「XamlParseException」で電話がクラッシュします。
<Style x:Key="BackgroundStyle" TargetType="Grid">
<Setter Property="Background">
<Setter.Value>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="48" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="Green" />
<Grid Grid.Row="1" Background="Yellow" />
</Grid>
</Setter.Value>
</Setter>
</Style>
xamlでこのようなことを行うことは可能ですか、それともこの効果を作成するために背景として画像を使用する必要がありますか?