Capture Pane Close event

4 posts, 0 answers
  1. Muhammad Irfan
    Muhammad Irfan avatar
    18 posts
    Member since:
    Jan 2010

    Posted 18 Aug 2011 Link to this post

    Hi, I am trying to use create dynamically Panes in RadDocking using PaneGroupExtensions class using MVVM pattern. It is working fine with my item source. However my requirements is slightly change that if any Pane is visible already then it should not add a new tab again, instead just highlight (select) previously added Pane.
    For this I am holding a Dictionary that which Pane is visible but I can't find any way that when user close Pane from RadDocking then how can I capture this event so that I can remove the object from my dictionary.

    Many Thanks,
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Aug 2011 Link to this post

    Hi Muhammad,

    You can use the Close event of the Docking, which is fired when a pane is closed.

    Best wishes,
    Konstantina
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Muhammad Irfan
    Muhammad Irfan avatar
    18 posts
    Member since:
    Jan 2010

    Posted 23 Aug 2011 Link to this post

    Thank you Konstantina, But I could not see any way to capture this event using Binding with my ViewModel event. Can you please give me any code snippet of this event with proper binding (in MVVM pattern).
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 26 Aug 2011 Link to this post

    Hi Muhammad,

    I can suggest you the following approaches:
    1) Since you keep a dictionary of the Panes in the ViewModel, you can add some logic in the View, which will tell the ViewModel that a Pane has been closed and remove it from the dictionary.
    2) You can bind to the IsHidden property of the Pane.
    3) There is a third approach which is illustrated in this help resource:
    http://www.codeproject.com/KB/silverlight/SilverlightEventBinding.aspx
    However, I haven't try it with RadDocking control, so I cannot confirm that is working smoothly, but it is a good practice and it's worth the try.

    Hope this information was helpful.

    Kind regards,
    Konstantina
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top