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.
Unfortunately, activation email could not send to your email. Please try again.

pass the MdiDocument as parameter in DocumentClosing event

Thread ID:

Created:

Updated:

Platform:

Replies:

129721 Mar 30,2017 06:18 AM Mar 31,2017 07:45 AM WPF 1
loading
Tags: DocumentContainer
Giovanni Selvatico
Asked On March 30, 2017 06:18 AM

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:Interaction.Triggers>
    <i:EventTrigger EventName="DocumentClosing">
        <i:InvokeCommandAction  
            Command="{Binding Path=ClosingMDICommand}"
            CommandParameter="????????" /> <!-- I want to pass the document I'm closing-->
        </i:EventTrigger>
  </i:Interaction.Triggers>
</syncfusion:DocumentContainer>

          

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

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.

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

Regards,
Subashini M.
 


CONFIRMATION

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.

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.

;