.net 如何将画笔背景添加到中心标题以使白色文本在白色背景上更具可读性?

.net 如何将画笔背景添加到中心标题以使白色文本在白色背景上更具可读性?,.net,xaml,brush,.net,Xaml,Brush,我有浅色背景的标准版。不幸的是,Hub的头部非常轻。如何使背景更暗。 您是否尝试将前景添加到文本块 <Hub.Header> <!-- Back button and page title --> <Grid> <TextBlock Text="Yolo funcy, faded text" Foreground="Black"></TextBlock> &l

我有浅色背景的标准版。不幸的是,Hub的头部非常轻。如何使背景更暗。


您是否尝试将前景添加到文本块

  <Hub.Header>
        <!-- Back button and page title -->
        <Grid>
            <TextBlock Text="Yolo funcy, faded text" Foreground="Black"></TextBlock>
        </Grid>
    </Hub.Header>

在HubSection的原始模板中,标题表示为按钮,没有特殊的前景样式。 因此,您可以覆盖默认的主题笔刷:ButtonFoundTheMebrush:

请记住,它将更改所有具有通用样式的按钮的前景

以下是HubSection模板中标题按钮的其他资源:

<SolidColorBrush x:Key="HubSectionHeaderPointerOverForegroundThemeBrush" Color="Red" />
<SolidColorBrush x:Key="HubSectionHeaderPressedForegroundThemeBrush" Color="Red" />
<SolidColorBrush x:Key="ButtonDisabledForegroundThemeBrush" Color="Red" />
  <Hub.Header>
        <!-- Back button and page title -->
        <Grid>
            <TextBlock Text="Yolo funcy, faded text" Foreground="Black"></TextBlock>
        </Grid>
    </Hub.Header>
<SolidColorBrush x:Key="ButtonForegroundThemeBrush" Color="Red" />
<SolidColorBrush x:Key="HubSectionHeaderPointerOverForegroundThemeBrush" Color="Red" />
<SolidColorBrush x:Key="HubSectionHeaderPressedForegroundThemeBrush" Color="Red" />
<SolidColorBrush x:Key="ButtonDisabledForegroundThemeBrush" Color="Red" />