We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mdi document state changed event

Thread ID:





129482 Mar 21,2017 03:46 PM UTC Mar 24,2017 03:14 PM UTC WPF 3
Tags: DockingManager
Giovanni Selvatico
Asked On March 21, 2017 03:46 PM UTC

What is the name of the event to trigger in XAML when I Maximize, Minimize or Restore a MDI document inside a DockingManager?  

        <i:EventTrigger EventName="StateChanged"> <!-- This doesn't work!-->
            <i:InvokeCommandAction Command="{Binding WindowStateCahangedCommand}"/>

Durga Rajan [Syncfusion]
Replied On March 22, 2017 05:32 PM UTC

Hi Giovanni,

Thank you for contacting Sycfusion support.

We have checked your query and prepared sample to meet your requirement. In this sample we have used Build-in "DockingManagerIsInMDIMaximizedStateChangedCommand" command of DockingManager. We can address only maximize and restoring state of the MDI windows. Please download the sample from the following location.

Sample: DockingManager_StateNotify

If we have misunderstood your query, please provide more details about your requirement. This would help us to provide the solution at the earliest.

Durga S.

Giovanni Selvatico
Replied On March 23, 2017 02:53 PM UTC

Thank you for your reply.
Sorry, I may not have been clear enough.
I'm working in a MVVM pattern.
I have a syncfusion DocumentContainer with the ItemSource property  binded in the ViewModel to an  ObservableCollection<UserControl> that I called MyMdiDocuments.
My MDI children are of type UserControl that I load at runtime adding them at MyMdiDocuments ObservableCollection.

The file header of these MDI children is like this:

<UserControl x:Class="HI_Mdi.UserControls.MyMDIForm"
             Height="auto" Width="auto" d:DesignWidth="600" d:DesignHeight="300" >

I would like to set a trigger to the "state changed" of the MDI documents.
Something like:
        <intr:EventTrigger EventName="StateChangedOrWhateverElseEventName"> 
          <intr:InvokeCommandAction Command="{Binding MyStateChangedCommand}"  />

Is it possible?

Durga Rajan [Syncfusion]
Replied On March 24, 2017 03:14 PM UTC

Hi Giovanni,

Thank you for the update.

Currently we do not have any routed event to notify the state change of MDI windows. But we can achieve this using behaviour of interaction instead of using triggers. We have prepared sample based on your requirement please download the sample from the following location.

Sample: DockingManager_DocumentContainer_Sample

Durga S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon