Telerik UI for UWP RadCalendar How to use commands
I am not sure how to use The RadCalendar comands to update a property in my view model. I follwed this sample from Telreic.
https://docs.telerik.com/devtools/universal-windows-platform/controls/radcalendar/commands/celltap
I created a class as stated:
public class CustomCellTapCommand : CalendarCommand
{
public CustomCellTapCommand()
{
Id = CommandId.CellTap;
}
public override bool CanExecute(object parameter)
{
CalendarCellTapContext ctx = parameter as CalendarCellTapContext;
var date = ctx.CellModel.Date;
if (date > DateTime.Now)
{
return false;
}
return true;
}
public override void Execute(object parameter)
{
CalendarCellModel context = parameter as CalendarCellModel;
}
}
Heres is the Xaml:
<Custom:RadCalendar.Commands>
<local:CustomCellTapCommand/>
</Custom:RadCalendar.Commands>
The CanExecute and Execute methods are being called ok in my custom class. How do I call the methods in the ViewModel?