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

Docking/MDI for WPF Forum

Posted 5 years ago by Yaron
Version: 14.2.0610
Avatar

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 5 years ago]

Comments (1)

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

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 (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.