This is a migrated thread and some comments may be shown as answers.

Capture Pane Close event

3 Answers 177 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Muhammad Irfan
Top achievements
Rank 1
Muhammad Irfan asked on 18 Aug 2011, 12:36 PM
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,

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 22 Aug 2011, 03:28 PM
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 >>

0
Muhammad Irfan
Top achievements
Rank 1
answered on 23 Aug 2011, 07:58 PM
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).
0
Konstantina
Telerik team
answered on 26 Aug 2011, 08:54 AM
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 >>

Tags
Docking
Asked by
Muhammad Irfan
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Muhammad Irfan
Top achievements
Rank 1
Share this question
or