I have the following style declared globally in the App.XAML file of my WinUI project:
<Style TargetType="Grid" x:Key="PageContentGrid">
<Setter Property="Margin" Value="5"/>
<Setter Property="RowSpacing" Value="5"/>
<Setter Property="ColumnSpacing" Value="5"/>
</Style>
My goal is to add another Style defenition that will only target Buttons that are part of a Grid that implements the PageContentGrid Style (see sample xaml code below). Is there any way to do this?
<Grid Style={StaticResource PageContentGrid}>
<Button/> <!-- STYLED -->
</Grid>
<Grid>
<Button/><!-- NOT STYLED -->
</Grid>