I am doing the following to load my own custom appointment dialog, it sort of works, as in it loads my view but I was wondering if there is a cleaner approach. I also need the appointment dialog to be modal and there does not seem to be a way of doing this.
public
class CustomScheduleDialogFactory : ScheduleDialogFactoryBase
{
public override ActivityTypes SupportedActivityDialogTypes {
get { return ActivityTypes.Appointment; }
}
public override FrameworkElement CreateActivityDialog(
FrameworkElement container,
XamScheduleDataManager dataManager,
ActivityBase activity,
bool allowModifications,
bool allowRemove)
switch (activity.ActivityType)
case ActivityType.Appointment:
AppointmentDialogView view = new AppointmentDialogView(activity as Appointment, null);
return view;
default: {
return null;
Hello anne,
Thank you for your post.
Please refer to the following forum post that contains an example on creating a custom Appointment with the xamSchedule control:
http://ko.infragistics.com/community/forums/t/68809.aspx
Please refer to the following forum post that explains how the DialogManager works within the xamSchedule control:
http://ko.infragistics.com/community/forums/p/66513/336142.aspx
Sincerely,
Hi I have used the second approach and done the following, to call my custom view as modal, I just assumed the infragistics controls would have catered for modal appointment views and not need this work around. Posted for those that may need this approach.
private void OnActivityDialogDisplaying(object sender, ActivityDialogDisplayingEventArgs e)
e.Cancel =true;
AppointmentDialogView dialog = new AppointmentDialogView(e.Activity as Appointment, _regionManager, _container);
dialog.ShowDialog();
Hi Anne,
Thank you for posting your solution.