MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Fix not able to style the calendar item of a calendar

Open michaelmairegger opened this issue 3 years ago • 0 comments

https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/65c80dadef263a3c54cadb71b9b0237c3ac44b47/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Calendar.xaml#L667-L679

Since line 669 is bound to MaterialDesignCalendarItemPortrait it is not possible to overwrite this with the following code:

<Style x:Key="...."
       BasedOn="{StaticResource MaterialDesignDatePicker}"
       TargetType="{x:Type DatePicker}">
    
    <Setter Property="CalendarStyle" Value="{StaticResource MyCustomCalendarStyle}" />
</Style>

The changes in this PR addresses this issue

michaelmairegger avatar Sep 19 '22 11:09 michaelmairegger