I would like to add a click event, which sends information about the day, on the dayitem in the CalenderView in UWP. I'm having a hard time figuring out how.
[
I've already tried following, but it does not work and I can imagine that there's better ways to do it.
private async void KalenderView_DoubleTappedAsync(object sender, DoubleTappedRoutedEventArgs e)
{
Viewmodel.Calendar_ViewModel calender_Viewmodel = new Viewmodel.Calendar_ViewModel();
if ( KalenderView.SelectedDates != null )
{
await calender_Viewmodel.OpenNewWindowAsync();
}
else
{
}
}
}
and the XML:
<Grid>
<CalendarView
x:Name="KalenderView"
DoubleTapped="KalenderView_DoubleTappedAsync"
CalendarViewDayItemChanging="CalendarView_CalendarViewDayItemChanging" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Height="526" Width="936"
SelectionMode="Single"
DisplayMode="Month"/>
</Grid>