Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1485
Any way to know when a new pane is added to the XamDockManager?
posted

Hi,

I'm trying to find a way to know when a new pane is added so that I can "do something" when that happens (for example, set a binding between the new pane's header and a property in its content.)  I've tried to subclass the XamDockManager and add a event handler to the Panes property's CollectionChanged event, but that seems to be called only once, and there's nothing in the NotifyCollectionChangedEventArgs. I'm using MVVM/Prism/MEF with the XamDockManagerRegionAdapter, so I also need to avoid the need for UI-specific stuff in my client code.

Is this at all possible?

Thanks,
Michel

Parents
  • 54937
    Verified Answer
    Offline posted

    No there is no event in XamDockManager when panes are added/removed from somewhere within the control. Since the xamDockManager isn't adding/creating panes by itself, you must have code that is creating the panes (e.g. using the NCAL source or perhaps using the sample code I had in a blog about binding to a collection) so you would likely need to modify whatever source that is based on your needs.

Reply Children
No Data