예제 #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;
 }
 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);
 }
 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();
        }