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

pass the MdiDocument as parameter in DocumentClosing event

Thread ID:





129721 Mar 30,2017 10:18 AM UTC Mar 31,2017 11:45 AM UTC WPF 1
Tags: DocumentContainer
Giovanni Selvatico
Asked On March 30, 2017 10:18 AM UTC

MVVM pattern.
The ItemSource of my DocumentContainer is binded to an  ObservableCollection<UserControl>.
When I close a MDI Document in my DocumentContainer I can trigger the "DocumentClosing" event.
What is the parameter I have to use to pass (to the model) the MDI Document i am closing?

<syncfusion:DocumentContainer ItemsSource="{Binding MyMdiDocuments}"                                         
    <i:EventTrigger EventName="DocumentClosing">
            Command="{Binding Path=ClosingMDICommand}"
            CommandParameter="????????" /> <!-- I want to pass the document I'm closing-->


Subashini Mahendran [Syncfusion]
Replied On March 31, 2017 11:45 AM UTC

Hi Giovanni Selvatico,

We have checked your query "Pass the MDIDocument as parameter in DocumentClosing event" and we have prepared the sample to meet your requirement. In this sample, we have used Build-in "DocumentContainerDocumentClosingCommand" command of DocumentContainer and bound ActiveDocument as CommandParameter. Please download the sample from the below location.

If we misunderstood your reqiurement, can you please provide us more information regarding the requirement. This would help us to proceed further.

Subashini M.


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