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

pass the MdiDocument as parameter in DocumentClosing event

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-->


1 Reply

SM Subashini Mahendran Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon