Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Styling XamDateNavigator
posted

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!

Parents
No Data
Reply
  • 4850
    Offline posted

    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">

     

     

     

     

     

    <ig:XamDateNavigator.ResourceProvider>

     

     

     

     

     

    <ig:CalendarResourceProvider>

     

     

     

     

     

    <ig:CalendarResourceProvider.ResourceOverrides>

     

     

     

     

     

    <ResourceDictionary>

     

     

     

     

     

    <SolidColorBrush x:Key="DayOfWeekForegroundBrush" Color="Red"/>

     

     

     

     

     

    </ResourceDictionary>

     

     

     

     

     

    </ig:CalendarResourceProvider.ResourceOverrides>

     

     

     

     

     

    </ig:CalendarResourceProvider>

     

     

     

     

     

    </ig:XamDateNavigator.ResourceProvider>

    </i

     

     

    g:XamDateNavigator>

     

     

     

Children