This is a migrated thread and some comments may be shown as answers.

set the style for items only in current month

2 Answers 24 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Zhong
Top achievements
Rank 1
Zhong asked on 26 Feb 2013, 09:30 AM
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 Answers, 1 is accepted

Sort by
0
Zhong
Top achievements
Rank 1
answered on 26 Feb 2013, 10:23 AM
I found the property "IsFromCurrentView", it solved my problem. Thanks
0
Alex
Top achievements
Rank 1
answered on 08 Apr 2013, 03:08 PM
There is a visual state in the 
 <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
....
    <VisualState x:Name="IsNotFromCurrentView">
.....

Use it


Tags
Calendar
Asked by
Zhong
Top achievements
Rank 1
Answers by
Zhong
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Share this question
or