protected override void Dispose(bool disposing)
        {
            if (Pattern != null)
            {
                System.Runtime.InteropServices.Marshal.ReleaseComObject(Pattern);
                this.Pattern = null;
            }

            base.Dispose(disposing);
        }
        public StylesPattern(A11yElement e, IUIAutomationStylesPattern p) : base(e, PatternType.UIA_StylesPatternId)
        {
            Pattern = p;

            PopulateProperties();
        }
Exemple #3
0
 internal static StylesPattern Wrap(
     AutomationElement element,
     IUIAutomationStylesPattern stylesPattern)
 {
     return(new StylesPattern(element: element, stylesPattern: stylesPattern));
 }
 private StylesPattern(AutomationElement el, IUIAutomationStylesPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Exemple #5
0
 StylesPattern(AutomationElement element, IUIAutomationStylesPattern stylesPattern)
     : base(el: element)
 {
     this._stylesPattern = stylesPattern;
 }