I have the requirements to style the calendar with a specific Color Theme.
I defined the following Styles:
<UserControl.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type igPrim:MonthViewDayHeader}" ... />
<Style TargetType="{x:Type igPrim:DayViewDayHeader}" ... />
<Style TargetType="{x:Type igPrim:MonthViewDay}" ... />
<Style TargetType="{x:Type igPrim:MonthViewWeekHeader}" ... />
</ResourceDictionary>
</UserControl.Resources>
These Styles are derived from generic.shared.xaml and mainly override the ComputedBackground in the ControlTemplate.
These Styles are working like intended, except every 5th Monday the default Infragistics Styles are used.
I'll appreciate any help.
Hi Matthias,
Can you please provide an isolated sample which demonstrates this behavior?
Looking forward to hearing from you.
Sincerely,TeodorSoftware Developer
Here is a sample, which luckily have the Monday-Behavior. =)
I am glad that I was able to help.
Sincerely,Teodor Tenev
Ok, I did not expect a WPF framework Bug. But I can deal with your workaround.
Thank you very much.
Hi Matthias.
After investigating this it appeared to be a bug in the WPF framework involving implicit styles. I have attached a sample that shows the same issue using just a WPF ListBox. The issue seems to be that the implicit style for the 1st element uses the default style (i.e. ignores the style in the nested merged dictionary) but the rest of the elements get the correct implicit style.
If you require any further assistance on the matter, please let me know.
Sincerely,Teodor TenevSoftware Developer
Hello,
I was able to reproduce the issue and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 243018. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
The issue seems to be caused by the fact that the ResourceDictionary for the xamSchedule is nested inside MergeDictionaries. As a workaround you can move that ResourceDictionary for instance in the Resources of the StackPanel directly. I have attached a sample which resolves the issue.
Please let me know if you need more information.