This question is locked. New answers and comments are not allowed.
Hi,
In my app, I can create "appointments" and "quick appointments" : they are exactly the same but only the ScheduleViewDialog will be different.
So, I've implemented my ScheduleViewDialogHostFactory, and I want to let the user choose with the context menu :
How can I find what the user selected between the both on the ScheduleViewDialogHostFactory to display the correct window ?
I've tried to bind my own commands, and then call the ScheduleViewDialogHostFactory with a parameter like that :
But this scheduleView has no appointment attached...
Thanks.
In my app, I can create "appointments" and "quick appointments" : they are exactly the same but only the ScheduleViewDialog will be different.
So, I've implemented my ScheduleViewDialogHostFactory, and I want to let the user choose with the context menu :
<telerik:RadContextMenu.ContextMenu> <telerik:RadContextMenu > <telerik:RadMenuItem Header="New appointment..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}" Command="schedule:RadScheduleViewCommands.CreateAppointment" /> <telerik:RadMenuItem Header="New quick appointment..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}" Command="schedule:RadScheduleViewCommands.CreateAppointment" /> </telerik:RadContextMenu></telerik:RadContextMenu.ContextMenu>How can I find what the user selected between the both on the ScheduleViewDialogHostFactory to display the correct window ?
I've tried to bind my own commands, and then call the ScheduleViewDialogHostFactory with a parameter like that :
<telerik:RadMenuItem Header="New quick appointment..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}" Command="{Binding QuickAppointmentCreated}" CommandParameter="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}" />ScheduleViewModel.csScheduleViewDialogHostFactory.cspublicICommand QuickAppointmentCreated {get;privateset; }QuickAppointmentCreated =newDelegateCommand(CreateQuickAppointment);publicvoidCreateQuickAppointment(objectparam){RadScheduleView rsv = paramasRadScheduleView;IScheduleViewDialogHost cw = ScheduleViewDialogHostFactory.CreateNew(rsv, DialogType.AppointmentDialog, ModalType.QuickAppointment);if(cw !=null) { cw.Show(true); }}caseModalType.QuickAppointment:{CwEditQuickAppointmentDialog cw =newCwEditQuickAppointmentDialog() { ScheduleView = scheduleViewcw.Closed +=newEventHandler<WindowClosedEventArgs>(Dialog_Closed);returncw;}
But this scheduleView has no appointment attached...
Thanks.