This question is locked. New answers and comments are not allowed.
I've hade a problem for quite a while now, but I thought it hade to do with the trial version.
Today we purchased and installed the developer version, but my problem stayed.
If I open an appointment from the ScheduleView, close it and open it again (or another one) then close it, my whole Silverlight page is disabled. Usually it's after two or three dialog open/close.
I have my own dialog factory that implements the IScheduleViewDialogHostFactory.
I also have my own edit appointment dialog which is a standard Silverlight ChildWindow that implements the IScheduleViewDialogHost interface.
I guess I'm doing something wrong when closing it perhaps?
Regards,
Håkan
Today we purchased and installed the developer version, but my problem stayed.
If I open an appointment from the ScheduleView, close it and open it again (or another one) then close it, my whole Silverlight page is disabled. Usually it's after two or three dialog open/close.
I have my own dialog factory that implements the IScheduleViewDialogHostFactory.
I also have my own edit appointment dialog which is a standard Silverlight ChildWindow that implements the IScheduleViewDialogHost interface.
I guess I'm doing something wrong when closing it perhaps?
public class TimeScheduleWindowFactory : IScheduleViewDialogHostFactory { public event EventHandler<WindowClosedEventArgs> EditShiftDialog_Closed; public event EventHandler<WindowClosedEventArgs> DeleteShiftDialog_Closed; private int actorCompanyId; private int userId; private TermUtility termUtil; public TimeScheduleWindowFactory(int actorCompanyId, TermUtility termUtil, int userId = 0) { this.userId = userId; this.actorCompanyId = actorCompanyId; this.termUtil = termUtil; } public IScheduleViewDialogHost CreateNew(ScheduleViewBase scheduleView, DialogType dialogType) { switch (dialogType) { case DialogType.AppointmentDialog: // Create new AppointmentDialogHost TimeScheduleShift shift = scheduleView.CurrentAppointment as TimeScheduleShift; if (shift != null && shift.ActualStart == new DateTime()) { shift.ActualStart = shift.Start; shift.ActualEnd = shift.End; } EditShiftDialog editShiftDialog = new EditShiftDialog(termUtil, shift, actorCompanyId, userId); editShiftDialog.ScheduleView = scheduleView; editShiftDialog.Closed += new EventHandler<WindowClosedEventArgs>(AppointmentDialog_Closed); editShiftDialog.Initialize(); return editShiftDialog; case DialogType.ConfirmationDialog: // Create new ConfirmationDialogHost DeleteShiftDialog deleteShiftDialog = new DeleteShiftDialog(termUtil, actorCompanyId); deleteShiftDialog.ScheduleView = scheduleView; deleteShiftDialog.Closed += new EventHandler<WindowClosedEventArgs>(ConfirmationDialog_Closed); return deleteShiftDialog; case DialogType.RecurrenceChoiceDialog: // Create new RecurrenceChoiceDialogHost //throw new NotImplementedException(); break; case DialogType.RecurrenceDialog: // Create new RecurrenceDialogHost //throw new NotImplementedException(); break; default: //throw new NotImplementedException(); break; } // TODO: Can't return null, it will crash! return null; } private void AppointmentDialog_Closed(object sender, WindowClosedEventArgs e) { if (EditShiftDialog_Closed != null) EditShiftDialog_Closed(sender, e); } private void ConfirmationDialog_Closed(object sender, WindowClosedEventArgs e) { if (DeleteShiftDialog_Closed != null) DeleteShiftDialog_Closed(sender, e); }Regards,
Håkan