Inheritance: ComponentParentAdapter
コード例 #1
0
ファイル: ComboBoxDropDown.cs プロジェクト: mono/uia2atk
		public override void RaiseAutomationPropertyChangedEvent (System.Windows.Automation.AutomationPropertyChangedEventArgs e)
		{
			if (e.Property.Id != ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty.Id) {
				base.RaiseAutomationPropertyChangedEvent (e);
				return;
			}

			ExpandCollapseState newState = (ExpandCollapseState)e.NewValue;
			if (newState == ExpandCollapseState.Expanded) {
				if (fakeWindow == null) {
					fakeWindow = new DropDownWindow ();
					fakeWindow.AddOneChild ((Adapter)RefAccessibleChild (0));
				}
				TopLevelRootItem.Instance.AddOneChild (fakeWindow);
				TopLevelRootItem.Instance.CheckAndHandleNewActiveWindow (fakeWindow);
			} else if (newState == ExpandCollapseState.Collapsed) {
				Atk.Object realWindow = this;
				while (realWindow != null && !(realWindow is Window))
					realWindow = realWindow.Parent;
				if (realWindow != null)
					TopLevelRootItem.Instance.CheckAndHandleNewActiveWindow (fakeWindow, (Window)realWindow);
				TopLevelRootItem.Instance.RemoveChild (fakeWindow, false);
			}
			InnerMenu.RaiseExpandedCollapsed ();
		}
コード例 #2
0
ファイル: TopLevelRootItem.cs プロジェクト: mono/uia2atk
		internal void WindowDeactivated (Window win)
		{
			if (object.ReferenceEquals (currentActiveWindow, win))
				currentActiveWindow = null;
		}