コード例 #1
0
 ExpandCollapsePattern(
     AutomationElement element,
     IUIAutomationExpandCollapsePattern expandCollapsePattern)
     : base(el: element)
 {
     this._expandCollapsePattern = expandCollapsePattern;
 }
コード例 #2
0
        protected override void Dispose(bool disposing)
        {
            if (Pattern != null)
            {
                Marshal.ReleaseComObject(Pattern);
                this.Pattern = null;
            }

            base.Dispose(disposing);
        }
コード例 #3
0
        public ExpandCollapsePattern(A11yElement e, IUIAutomationExpandCollapsePattern p) : base(e, PatternType.UIA_ExpandCollapsePatternId)
        {
            // UIA sometimes throws a COMException. If it does, exclude it
            // from telemetry
            ExcludingExceptionWrapper.ExecuteWithExcludedExceptionConversion(typeof(COMException), () =>
            {
                Pattern = p;

                PopulateProperties();
            });
        }
コード例 #4
0
 private ExpandCollapsePattern(IUIAutomationExpandCollapsePattern pattern)
 {
     _pattern = pattern;
 }
コード例 #5
0
 private ExpandCollapsePattern(IUIAutomationExpandCollapsePattern pattern)
 {
     _pattern = pattern;
 }
コード例 #6
0
 public UiAutomationExpandCollapseHint(IntPtr owningWindow, IUIAutomationExpandCollapsePattern expandCollapsePattern, Rect boundingRectangle)
     : base(owningWindow, boundingRectangle)
 {
     _expandCollapsePattern = expandCollapsePattern;
 }
 public static void xtExpand(this IUIAutomationElement element)
 {
     _ExpandCollapsePattern = (IUIAutomationExpandCollapsePattern)element.GetCurrentPattern(UIA_PatternIds.UIA_ExpandCollapsePatternId);
     _ExpandCollapsePattern.Expand();
 }
コード例 #8
0
 internal static ExpandCollapsePattern Wrap(
     AutomationElement element,
     IUIAutomationExpandCollapsePattern expandCollapsePattern)
 {
     return(new ExpandCollapsePattern(element: element, expandCollapsePattern: expandCollapsePattern));
 }
コード例 #9
0
 public static IUIAutomationElement xtCollapse(this IUIAutomationElement element)
 {
     _ExpandCollapsePattern = (IUIAutomationExpandCollapsePattern)element.GetCurrentPattern(UIA_PatternIds.UIA_ExpandCollapsePatternId);
     _ExpandCollapsePattern.Collapse();
     return(element);
 }
コード例 #10
0
 public static ExpandCollapseState xtGetExpandCollapseState(this IUIAutomationElement element)
 {
     _ExpandCollapsePattern = (IUIAutomationExpandCollapsePattern)element.GetCurrentPattern(UIA_PatternIds.UIA_ExpandCollapsePatternId);
     return(_ExpandCollapsePattern.CurrentExpandCollapseState);
 }
コード例 #11
0
 private ExpandCollapsePattern(AutomationElement el, IUIAutomationExpandCollapsePattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
コード例 #12
0
        public ExpandCollapsePattern(A11yElement e, IUIAutomationExpandCollapsePattern p) : base(e, PatternType.UIA_ExpandCollapsePatternId)
        {
            Pattern = p;

            PopulateProperties();
        }