set the style for items only in current month

3 posts, 0 answers
  1. Zhong
    Zhong avatar
    3 posts
    Member since:
    Feb 2013

    Posted 26 Feb 2013 Link to this post

    I want to change the background of each CalendarButton item in the current month, but for those items not in current month (some days from previous month or next month) I want to change them to another background. right now, if I add the ItemTemplate, all items background will be changed. How can I set the background for those different types items?
    Many thanks!
  2. Zhong
    Zhong avatar
    3 posts
    Member since:
    Feb 2013

    Posted 26 Feb 2013 Link to this post

    I found the property "IsFromCurrentView", it solved my problem. Thanks
  3. DevCraft banner
  4. Alex
    Alex avatar
    25 posts
    Member since:
    Mar 2011

    Posted 08 Apr 2013 Link to this post

    There is a visual state in the 
     <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
    ....
        <VisualState x:Name="IsNotFromCurrentView">
    .....

    Use it


Back to Top