Yair Briones
Yair Briones

Reputation: 41

Change date color from a material DataPicker in WPF

I´m a little new using WPF, and i´m implementing the MaterialDesing library. I want to change the color of certain propierties of a DataPicker but cannot find where to do that. Specially the container that has the year, day and month (the one that is in blue)

DatePicker

Upvotes: 0

Views: 376

Answers (1)

mm8
mm8

Reputation: 169420

You could override the PrimaryHueMidBrush resource:

<DatePicker>
    <DatePicker.CalendarStyle>
        <Style TargetType="Calendar" BasedOn="{StaticResource MaterialDesignCalendarPortrait}">
            <Style.Resources>
                <SolidColorBrush x:Key="PrimaryHueMidBrush" Color="Red" />
            </Style.Resources>
        </Style>
    </DatePicker.CalendarStyle>
</DatePicker>

Upvotes: 1

Related Questions