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. Image for the cookie policy date

Mdi document state changed event

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}"/>

3 Replies

DR Durga Rajan Syncfusion Team 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.

GS Giovanni Selvatico 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?

DR Durga Rajan Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon