Exemple #1
0
        public static void SelectTab(CommandProperties commandProperties)
        {
            string  tabId = commandProperties.SourceControlId.Replace(SELECT_TAB_COMMAND_PREFIX, "");
            Element tab   = Window.Parent.Parent.Document.GetElementById("TabNode_tab0Tab-main");

            // Move back to the main form
            if (tab != null)
            {
                tab.Click();
            }

            TabItem tabControl = Page.Ui.Tabs.Get(tabId);

            if (tabControl.GetDisplayState() == DisplayState.Collapsed)
            {
                tabControl.SetDisplayState(DisplayState.Expanded);
            }
            tabControl.SetFocus();
        }