2017-01-02 39 views
2

我需要改变,在UWP,濑越MDL2资产字体CalendarDatePicker内的颜色,使它看起来像这样(蓝色图标):更改CalendarGlyph的前景财产CalendarDatePicker

enter image description here

我“看着已经在我的应用程序的DINAMIC树,我相信我需要改变CalendarDatePicker CalendarGlyph的‘前景’属性:

enter image description hereenter image description here

我知道如何将样式应用于CalendarDatePicker,但我不知道如何将样式应用于CalendarDatePicker中的特定元素。

+0

使用融为一体,右键单击元素,应该是这样的风格 - >编辑复制 – Alex

回答

3

你需要重写CalendarDatePickerCalendarGlyphForeground的SolidColorBrush资源:

<CalendarDatePicker> 
    <CalendarDatePicker.Resources> 
     <SolidColorBrush x:Key="CalendarDatePickerCalendarGlyphForeground" Color="CornflowerBlue"/> 
    </CalendarDatePicker.Resources> 
</CalendarDatePicker> 

若要将此所有日历日期选择器,范围适当资源(例如,把它放在Application.Resources资源字典在App.xaml.cs它在应用程序范围内应用)。

Screenshot

+0

完美!这正是我所期待的! – CarlosTI