How to stop switching to another tab and keeping it stay at the original tab?

Docking/MDI for WPF Forum

Posted 10 years ago by Yaron
Version: 14.2.0610

Here is my case, I'm developing application with MVVM pattern.  I have several "docking:DocumentWindow"s  within "docking:TabbedMdiContainer" control. And I bind the property "SelectedIndex" to property "TabChanged"  in my view model. Here is the case, currenly the tab1 is selected, user input something in this tab and then switch to another tab: tab2.  This action will trigger the set method of property "TabChanged" to take some error check for the content user inputs in tab1, if the check result is false, I want to keep the tab1 selected instead of switching to tab2.  But I cannot make it. Whatever I did cannot stop it from switching to tab2.  Is there any way to make it? Any help will do me a big favor, thanks a lot.

[Modified 10 years ago]

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Yaron,

Sorry but we don't really have a way to prevent tab changes.  What you could do is call DocumentWindow.Activate(true) when you detect that scenario.  The Activate() method will ensure the document is selected and its content focused.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.