Hi there,
I cannot set any Styles on the Navigator.
I tried it with an CalendarResourceProvider and it worked but the weeknumber and weekday fields are always with foreground black. I cannot set another color.
I tried also to create an style for the CalendarWeekNumber and CalendarDayOfWeek Classes but that has no effect.
Also I wanted to change the style of highlighted days with activities. They are only bold and that is not enough.
I'm using currently Version 11.1
Thanks for any answer!
You should be able to override the week number and day of week header foreground via the ResourceOverrides on the data navigator's resoureprovider as with the snippet below.
As far as doing something more that bold with days that have activity you would have to re-template the CalendarDay class and use the IsHighlighted property it exposed or use the VSM 'HightLight' group (IsHighlighted or IsNotHightlighted states) to do what you want.
<ig:XamDateNavigator x:Name="datNav" DataManager="{Binding ElementName=dataManager}" WeekNumberVisibility="Visible">
</i
g:XamDateNavigator>
I have tested this snipped. Before I had the same in an C# class derived from CalendarResourceProvider.
But the DayOfWeekForegroundBrush cannot be changed with this.
With your snipped it is also Black.
The other thing with styling is that my styles never used by the navigator. They are ignored.
Hmm. That is interesting. I tried the snippet before I posted it and it causes my day of week headers and week numbers to be displayed with a red foreground.
Maybe there was a bug fix that I'm not aware of. Are you using the latest service release?
If you are and still running into a problem can you post a stripped done sample so I can see what is going on?
Thanks,
Hi,
update 20111.2173 solved the problem.
thank you.
If you do not want to upgrade to 2011-2, I suggest you to unstall the latest service release for 2011-1, where this problem is resolved. I have checked this sample with the 20111.2193 service release, and it is working as expected.
Olga G.
OK first of all thank you for your help.
I have created a new project with 2011-1 build. Same issue.
On my Laptop I have now 2011-2 and there the same sample works.
Seems to be a bug of 2011-1.
The thing with the styles I will try later.
I have version 2011-1
I dont wanted to upgrade this week because I need a working version until weekend.
I will try this in a new project