Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1150
Using custom Activity Dialogs in Schedule control: DialogManager
posted

Hi,

I am currently evaluating the Schedule control and noticed a problem when creating custom dialogs for it. The DialogFactory is working fine, but insufficient. My problem is that there seems to be a "DialogManager" working in the background, which is doing a bit more with the Window-object I provide than I would like to (as seen in Reflector).

- It shows the dialog non-modal (I would like a modal dialog)

- It sets the Window's owner to itself instead to the actual parent window (I want to specify the Window owner myself)

- It resizes the Window (I use a Settings class to save and restore last used window sizes, so I don't want the DialogManager to interfere)

- Plus some other actions like a focus change or a window title change that I'd rather not have.

Can you please tell me how to avoid the "magic" invoked by the DialogManager?

Best regards,

Florian

Parents
No Data
Reply
  • 8576
    Offline posted

    Hi Florian -

    The DialogManager class is designed to abstract away the differences involved in displaying dialogs in WPF and SL. It does go a bit further however when it gets involved in window sizing, modality and focus to suit the needs of the Schedule controls.  To get around this we could potentially raise a new event in the XamScheduleDataManager to give you the opportunity to affect sizing, modality and focus and even the Window owner before the dialog is displayed.  Please submit a Feature Request for this.

    As an alternative you should be able to listen for the XamScheduleDataManager's ActivityDialogDisplaying event and cancel it so you can create/display your own dialog in a way that works best for your app.

    Joe

Children