讓說我要風格網格背景像:UWP的XAML:適用於兒童的集裝箱風格
<Page.Resources>
<Style x:key="MainGridStyle" TargetType="Grid">
<Setter Property="Background" Value="Blue" />
</Style>
</Page.Resources>
我如何通過樣式使該MainGridStyle Foreground=White
裏面所有的TextBlocks?
感謝
可能重複https://stackoverflow.com/questions/12197667/how-do-i-set-the-foreground-color-任何子元素在網格中從網格 –
它不重複...適用於WPF,而不是UWP! (不幸) – danbord
你可以試試@Rachel答案的鏈接?希望它適合你 –