internal static string GetAutomationPeerCaption(this ViewElement viewElement) { string str = string.Empty; View view1 = viewElement as View; if (view1 != null) { str = view1.Title.ToString(); } else { TabGroup tabGroup = viewElement as TabGroup; if (tabGroup != null) { View view2 = tabGroup.SelectedElement as View; if (view2 != null) { str = view2.Title.ToString(); } } else { DockGroup dockGroup = viewElement as DockGroup; if (dockGroup != null && dockGroup.VisibleChildren.Count == 1) { str = ExtensionMethods.GetAutomationPeerCaption(dockGroup.VisibleChildren[0]); } } } return(str ?? string.Empty); }
protected virtual void OnAutoHideViewCore(ViewElement autoHidingElement, bool autoHideOnlyActiveView) { if (autoHidingElement.Parent is AutoHideGroup) { DockOperations.DockViewElementOrGroup(autoHidingElement, autoHideOnlyActiveView); } else { if (autoHideOnlyActiveView) { TabGroup tabGroup = autoHidingElement as TabGroup; if (tabGroup != null) { autoHidingElement = tabGroup.SelectedElement; } } DockOperations.AutoHide(autoHidingElement); } }