Skip to content

Conversation

@michaelmairegger
Copy link
Contributor

<CalendarItem
x:Name="PART_CalendarItem"
Style="{DynamicResource MaterialDesignCalendarItemPortrait}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
wpf:CalendarAssist.IsHeaderVisible="{TemplateBinding wpf:CalendarAssist.IsHeaderVisible}"
wpf:CalendarAssist.Orientation="{TemplateBinding wpf:CalendarAssist.Orientation}"
wpf:ElevationAssist.Elevation="{TemplateBinding wpf:ElevationAssist.Elevation}"
wpf:CalendarAssist.HeaderBackground="{TemplateBinding wpf:CalendarAssist.HeaderBackground}"
wpf:CalendarAssist.HeaderForeground="{TemplateBinding wpf:CalendarAssist.HeaderForeground}"/>
</ControlTemplate>

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

@Keboo Keboo added this to the 4.6.1 milestone Sep 22, 2022
@Keboo Keboo merged commit a66503f into MaterialDesignInXAML:master Sep 22, 2022
@michaelmairegger michaelmairegger deleted the hotfix/calendar-item-style branch September 22, 2022 06:50
@Keboo Keboo added the release notes Items are likely to be highlighted in the release notes. label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes Items are likely to be highlighted in the release notes.

2 participants