Highlight date in WinRTXamlToolkit.Controls.Calendar

221 Views Asked by At

I am using WinRTXamlToolkit.Controls.Calendar in windows 8.1 phone app and can display the calendar using following code:

<Page...
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
xmlns:wpcontrols="using:WinRTXamlToolkit.Controls">

<Grid>
    <Viewbox>
        <wpcontrols:Calendar 
            x:Name="Cal"
            />
    </Viewbox>
</Grid>

And in the .cs file I set the display date by using following code in OnNavigatedTo

Cal.DisplayDate = new DateTime(2015, 7, 7);

But I cannot highlight this date and if anybody has used this control could you please give me some advise on how to set and highlight the selected date? Thank you

1

There are 1 best solutions below

1
On

Thanks I had to set the following to get the date hhighlighted:

Cal.SelectedDate = new DateTime(2015, 6, 7);