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
50
Editable HeaderName and Handle Close event of Tab in XamDockManager using MVVM
posted

I am Creating Tabs in XamDockManager dynamically using MVVM and Content / Header Name / Close button of each tab currently coming up correctly on screen.

But I am facing below issues

1. Editable Header : How to create editable header name using MVVM

2. How to bind tab Close event to ViewModel using MVVM

Your quick suggestion or any sample application will be appreciated. Thanks in advance. 

Parents
  • 34830
    Offline posted

    Hello Vijay,

    I have been investigating into these behaviors that you are looking to achieve, and currently the panes of the XamDockManager do not support editable headers directly, although I am looking into a possible way that you could perhaps use the HeaderTemplate property of the ContentPanes in order to do this. I should have more information for you on this soon.

    Regarding handling the Close event in an MVVM way, there are a couple of recommendations I can make in this case. The first is that you write a derived ContentPane (which you may need to do in order to achieve the editable template anyway), and handle its Closing/Closed events in the custom ContentPane class. Another option in this case is to use a Behavior<ContentPane> and handle the Closing/Closed events that way. You can read further about behaviors in WPF here: https://wpftutorial.net/Behaviors.html.

    I will be continuing to investigate into a way to edit panes in the XamDockManager and update this thread when I have more information for you. Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Software Developer

Reply Children
No Data