コード例 #1
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Value)
                return this;

            return base.GetPattern(patternInterface);
        }
コード例 #2
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            // In .net4 ItemAutomationPeer implements VirtualizedItemPattern, then we would need to call base.GetPattern here.
            object peer = null;

            if (patternInterface == PatternInterface.ScrollItem)
            {
                peer = this;
            }
            else if (patternInterface == PatternInterface.ExpandCollapse)
            {
                // only if RibbonGroup is Collapsed this Pattern applies.
                RibbonGroup wrapperGroup = GetWrapper();
                if (wrapperGroup != null && wrapperGroup.IsCollapsed)
                {
                    peer = this;
                }
            }

            if (peer == null)
            {
                RibbonGroupAutomationPeer wrapperPeer = GetWrapperPeer();
                if (wrapperPeer != null)
                {
                    peer = wrapperPeer.GetPattern(patternInterface);
                }
            }
            return peer;
        }
コード例 #3
0
		public override object GetPattern (PatternInterface patternInterface)
		{
			if (patternInterface == PatternInterface.Scroll)
				return this;
			else
				return base.GetPattern (patternInterface);
		}
コード例 #4
0
        ///
        override public object GetPattern(PatternInterface patternInterface) 
        {
            if (patternInterface == PatternInterface.ExpandCollapse)
            {
                return this; 
            }
            else if (patternInterface == PatternInterface.SelectionItem) 
            { 
                return this;
            } 
            else if (patternInterface == PatternInterface.ScrollItem)
            {
                return this;
            } 
            else if ((patternInterface == PatternInterface.ItemContainer) || (patternInterface == PatternInterface.SynchronizedInput))
            { 
                TreeViewItemAutomationPeer treeViewItemAutomationPeer = GetWrapperPeer() as TreeViewItemAutomationPeer; 
                if (treeViewItemAutomationPeer != null)
                { 
                    if(patternInterface == PatternInterface.SynchronizedInput)
                    {
                        return treeViewItemAutomationPeer.GetPattern(patternInterface);
 
                    }
                    else 
                    { 
                        return treeViewItemAutomationPeer;
                    } 
                }
            }

            return base.GetPattern(patternInterface); 
        }
コード例 #5
0
        ///
        override public object GetPattern(PatternInterface patternInterface) 
        { 
            if (patternInterface == PatternInterface.VirtualizedItem)
            { 
                // Virtualization not supported for GriViewItem or when Grouping is enabled
                if(VirtualizedItemPatternIdentifiers.Pattern != null && !(this is GridViewItemAutomationPeer) && !IsGroupingEnabled())
                {
                    if(GetWrapperPeer() == null) 
                        return this;
                    else 
                    { 
                        // ItemsControlAutomationPeer can be null in case of TreeViewItems when parent TreeViewItem is also virtualized
                        // If the Item is in Automation Tree we consider it has Realized and need not return VirtualizeItem pattern. 
                        if(ItemsControlAutomationPeer != null && !IsItemInAutomationTree())
                        {
                            return this;
                        } 

                        if(ItemsControlAutomationPeer == null) 
                            return this; 
                    }
                } 
                return null;
            }
            else if(patternInterface == PatternInterface.SynchronizedInput)
            { 
                UIElementAutomationPeer peer = GetWrapperPeer() as UIElementAutomationPeer;
                if(peer != null) 
                { 
                    return peer.GetPattern(patternInterface);
                } 
            }

            return null;
        } 
    public override object GetPattern( PatternInterface patternInterface )
    {
      if( patternInterface == PatternInterface.ExpandCollapse )
        return this;

      return null;
    }
コード例 #7
0
 ///
 override public object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.Invoke) 
         return this;
     else 
         return base.GetPattern(patternInterface); 
 }
コード例 #8
0
        /// 
        override public object GetPattern(PatternInterface patternInterface)
        {
            object returnValue = null;

            if(patternInterface == PatternInterface.Value)
                returnValue = this;

            if (patternInterface == PatternInterface.Text)
            {
                if(_textPattern == null)
                    _textPattern = new TextAdaptor(this, ((TextBoxBase)Owner).TextContainer);

                return _textPattern;
            }

            if (patternInterface == PatternInterface.Scroll)
            {
                TextBox owner = (TextBox)Owner;
                if (owner.ScrollViewer != null)
                {
                    returnValue = owner.ScrollViewer.CreateAutomationPeer();
                    ((AutomationPeer)returnValue).EventsSource = this;
                }
            }

            if (patternInterface == PatternInterface.SynchronizedInput)
            {
                returnValue = base.GetPattern(patternInterface);
            }
            return returnValue;
        }
コード例 #9
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            switch (patternInterface)
            {
                case PatternInterface.Grid:
                case PatternInterface.Selection:
                case PatternInterface.Table:
                    return this;
                case PatternInterface.Scroll:
                    {
                        ScrollViewer scrollViewer = this.OwningDataGrid.InternalScrollHost;
                        if (scrollViewer != null)
                        {
                            AutomationPeer scrollPeer = UIElementAutomationPeer.CreatePeerForElement(scrollViewer);
                            IScrollProvider scrollProvider = scrollPeer as IScrollProvider;
                            if (scrollPeer != null && scrollProvider != null)
                            {
                                scrollPeer.EventsSource = this;
                                return scrollProvider;
                            }
                        }

                        break;
                    }
            }

            return base.GetPattern(patternInterface);
        }
コード例 #10
0
		public override object GetPattern (PatternInterface patternInterface)
		{
			if (patternInterface == PatternInterface.SelectionItem)
				return this;

			return base.GetPattern (patternInterface);
		}
コード例 #11
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            switch (patternInterface)
            {
                case PatternInterface.Invoke:
                    {
                        if (this.OwningHeader.Column != null && this.OwningHeader.Column.CanUserSort)
                        {
                            return this;
                        }

                        break;
                    }

                case PatternInterface.ScrollItem:
                    {
                        return this;
                    }

                case PatternInterface.Transform:
                    {
                        if (this.OwningHeader.Column != null && this.OwningHeader.Column.DataGridOwner.CanUserResizeColumns)
                        {
                            return this;
                        }
                        
                        break;
                    }
            }

            return base.GetPattern(patternInterface);
        }
コード例 #12
0
        /// <summary>
        /// <see cref="AutomationPeer.GetPattern"/>
        /// </summary>
        override public object GetPattern(PatternInterface patternInterface)
        {
            object returnValue = null;

            // Check if provided patternInterface is for Scroll, which is all
            // that is currently exposed.
            if (patternInterface == PatternInterface.Scroll)
            {
                // Get a reference to DocumentViewer's ScrollViewer
                DocumentViewer owner = (DocumentViewer)Owner;
                if (owner.ScrollViewer != null)
                {
                    // Get a reference to ScrollViewer's AutomationPeer.
                    AutomationPeer scrollPeer = UIElementAutomationPeer.CreatePeerForElement(owner.ScrollViewer);
                    if (scrollPeer != null && scrollPeer is IScrollProvider)
                    {
                        scrollPeer.EventsSource = this;
                        returnValue = scrollPeer;
                    }
                }
            }
            else
            {
                returnValue = base.GetPattern(patternInterface);
            }

            return returnValue;
        }
コード例 #13
0
        /// <summary>
        /// <see cref="AutomationPeer.GetAutomationControlTypeCore"/>
        /// </summary>
        public override object GetPattern(PatternInterface patternInterface)
        {
            object returnValue = null;

            if (patternInterface == PatternInterface.Text)
            {
                if (_textPattern == null)
                {
                    if (Owner is IServiceProvider)
                    {
                        ITextContainer textContainer = ((IServiceProvider)Owner).GetService(typeof(ITextContainer)) as ITextContainer;
                        if (textContainer != null)
                        {
                            _textPattern = new TextAdaptor(this, textContainer);
                        }
                    }
                }
                returnValue = _textPattern;
            }
            else
            {
                returnValue = base.GetPattern(patternInterface);
            }
            return returnValue;
        }
コード例 #14
0
        /// <summary> 
        /// Return the patterns supported by PasswordBoxAutomationPeer
        /// </summary> 
        /// <param name="patternInterface"></param> 
        /// <returns></returns>
        override public object GetPattern(PatternInterface patternInterface) 
        {
            object returnValue = null;

            if (patternInterface == PatternInterface.Value) 
            {
                returnValue = this; 
            } 
            else if (patternInterface == PatternInterface.Text)
            { 
                if (_textPattern == null)
                {
                    _textPattern = new TextAdaptor(this, ((PasswordBox)Owner).TextContainer);
                } 

                returnValue = _textPattern; 
            } 
            else if (patternInterface == PatternInterface.Scroll)
            { 
                PasswordBox owner = (PasswordBox)Owner;
                if (owner.ScrollViewer != null)
                {
                    returnValue = owner.ScrollViewer.CreateAutomationPeer(); 
                    ((AutomationPeer)returnValue).EventsSource = this;
                } 
            } 
            else
            { 
                returnValue = base.GetPattern(patternInterface);
            }

            return returnValue; 
        }
コード例 #15
0
 /// <summary>
 /// Gets the control pattern for the
 /// <see cref="T:Microsoft.Silverlight.Testing.Controls.GridSplitter" /> that is
 /// associated with this
 /// <see cref="T:System.Windows.Automation.Peers.GridSplitterAutomationPeer" />.
 /// </summary>
 /// <param name="patternInterface">
 /// One of the enumeration values.
 /// </param>
 /// <returns>
 /// The object that implements the pattern interface, or null if the
 /// specified pattern interface is not implemented by this peer.
 /// </returns>
 public override object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.Transform)
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #16
0
 public override object GetPattern(PatternInterface patternInterface)
 {
     var patternId = (int)patternInterface;
     if (patternId == TestOfMoreThanTwoPatternPropertiesPattern.Pattern ||
         patternId == AutomationElementRetievingPattern.Pattern.Id)
         return this;
     return base.GetPattern(patternInterface);
 }
コード例 #17
0
 ///
 public override object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.ScrollItem || patternInterface == PatternInterface.SelectionItem)
     {
         return this;
     }
     return null;
 }
コード例 #18
0
ファイル: DatePickerAutomationPeer.cs プロジェクト: dfr0/moon
 /// <summary>
 /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
 /// </summary>
 /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
 /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
 public override object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.ExpandCollapse || patternInterface == PatternInterface.Value)
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #19
0
 ///
 override public object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.ScrollItem)
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #20
0
        ///
        override public object GetPattern(PatternInterface patternInterface)
        {
            // Indeterminate ProgressBar should not support RangeValue pattern
            if (patternInterface == PatternInterface.RangeValue && ((ProgressBar)Owner).IsIndeterminate)
                return null;

            return base.GetPattern(patternInterface);
        }
コード例 #21
0
ファイル: ComboBoxAutomationPeer.cs プロジェクト: dfr0/moon
		public override object GetPattern (PatternInterface pattern)
		{
			if (pattern == PatternInterface.ExpandCollapse)
				return this;
			else if (pattern == PatternInterface.Value)
				return null;
			return base.GetPattern (pattern);
		}
コード例 #22
0
        /// <inheritdoc />
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Invoke || patternInterface == PatternInterface.Toggle)
            {
                return(this);
            }

            return(null);
        }
コード例 #23
0
        /// <summary>
        /// Gets the control pattern for this
        /// <see cref="T:System.Windows.Automation.Peers.FloatableWindowAutomationPeer" />.
        /// </summary>
        /// <param name="patternInterface">
        /// One of the enumeration values.
        /// </param>
        /// <returns>
        /// The object that implements the pattern interface, or null if the
        /// specified pattern interface is not implemented by this peer.
        /// </returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Transform || patternInterface == PatternInterface.Window)
            {
                return(this);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #24
0
        ///
        override public object GetPattern(PatternInterface patternInterface)
        {
            if(patternInterface == PatternInterface.Selection)
            {
                return this;
            }

            return base.GetPattern(patternInterface); // ItemsControlAutomationPeer support Scroll pattern
        }
コード例 #25
0
 public override object GetPattern(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.ExpandCollapse &&
         OwningToolBar.HasOverflowItems)
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #26
0
            public override object GetPattern(PatternInterface patternInterface)
            {
                if (patternInterface == PatternInterface.Value)
                {
                    return(this);
                }

                return(base.GetPattern(patternInterface));
            }
コード例 #27
0
 /// <summary>
 /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
 /// </summary>
 /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
 /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
 public override object GetPattern(PatternInterface patternInterface)
 {
     if ((patternInterface == PatternInterface.GridItem || patternInterface == PatternInterface.Invoke || patternInterface == PatternInterface.SelectionItem || patternInterface == PatternInterface.TableItem) &&
         (this.OwningCalendar != null && this.OwningCalendarDayButton != null))
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #28
0
        /// <inheritdoc />
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.SelectionItem)
            {
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #29
0
        /// <summary>
        /// Gets the control pattern for the Accordion that is associated
        /// with this AccordionAutomationPeer.
        /// </summary>
        /// <param name="patternInterface">The desired PatternInterface.</param>
        /// <returns>The desired AutomationPeer or null.</returns>
        public new object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Selection)
            {
                return this;
            }

            return base.GetPattern(patternInterface);
        }
コード例 #30
0
		public override object GetPattern (PatternInterface patternInterface)
		{
			if (patternInterface == PatternInterface.SelectionItem)
				return this;
			else if (patternInterface == PatternInterface.Toggle)
				// Mirrors the SL implementation
				return null;
			return base.GetPattern (patternInterface);
		}
コード例 #31
0
 /// <inheritdoc />
 protected override object GetPatternCore(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.Invoke &&
         Owner.AccessibilityTraits?.Contains(AccessibilityTrait.Button) == true)
     {
         return(this);
     }
     return(null);
 }
コード例 #32
0
ファイル: CalendarAutomationPeer.cs プロジェクト: dfr0/moon
 /// <summary>
 /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
 /// </summary>
 /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
 /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
 public override object GetPattern(PatternInterface patternInterface)
 {
     if ((patternInterface == PatternInterface.Grid || patternInterface == PatternInterface.Table || patternInterface == PatternInterface.MultipleView || patternInterface == PatternInterface.Selection)
          && this.OwningGrid != null)
     {
         return this;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #33
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.SelectionItem)
            {
                return(this);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #34
0
        /// 
        override public object GetPattern(PatternInterface patternInterface)
        { 
            if (patternInterface == PatternInterface.GridItem || patternInterface == PatternInterface.TableItem) 
            {
                return this; 
            }

            return base.GetPattern(patternInterface);
        } 
コード例 #35
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.ExpandCollapse)
            {
                return(this);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #36
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Value || patternInterface == PatternInterface.Selection)
            {
                return this;
            }

            return base.GetPattern(patternInterface);
        }
コード例 #37
0
 public override object GetPattern(PatternInterface patternInterface)
 {
     var state = Owner.State;
     if (patternInterface == PatternInterface.RangeValue && (state == ProgressState.Indeterminate || state == ProgressState.Busy))
     {
         return null;
     }
     return base.GetPattern(patternInterface);
 }
コード例 #38
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            object result       = null;
            Button owningButton = OwningButton;

            switch (patternInterface)
            {
            case PatternInterface.Invoke:
            case PatternInterface.GridItem:
            {
                if (owningButton != null)
                {
                    result = this;
                }
                break;
            }

            case PatternInterface.TableItem:
            {
                if (IsDayButton && owningButton != null)
                {
                    result = this;
                }
                break;
            }

            case PatternInterface.SelectionItem:
            {
                result = this;
                break;
            }

            case PatternInterface.VirtualizedItem:
                if (VirtualizedItemPatternIdentifiers.Pattern != null)
                {
                    if (owningButton == null)
                    {
                        result = this;
                    }
                    else
                    {
                        // If the Item is in Automation Tree we consider it Realized and need not return VirtualizedItem pattern.
                        if (!IsItemInAutomationTree())
                        {
                            return(this);
                        }
                    }
                }
                break;

            default:
                break;
            }

            return(result);
        }
コード例 #39
0
        /// <inheritdoc />
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Invoke)
            {
                //return ((SplitButton)this.Owner).button;
                return(this);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #40
0
        /// <summary>
        /// Gets the control pattern for the AccordionItem that is associated
        /// with this AccordionItemAutomationPeer.
        /// </summary>
        /// <param name="patternInterface">The desired PatternInterface.</param>
        /// <returns>The desired AutomationPeer or null.</returns>
        public new object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.ExpandCollapse ||
                patternInterface == PatternInterface.SelectionItem)
            {
                return(this);
            }

            return(null);
        }
コード例 #41
0
ファイル: TreeGridCell.cs プロジェクト: yungtau/oea
            public override object GetPattern(PatternInterface patternInterface)
            {
                //支持 Invoke
                if (patternInterface == PatternInterface.Invoke)
                {
                    return(this);
                }

                return(base.GetPattern(patternInterface));
            }
コード例 #42
0
            public override object GetPattern(PatternInterface patternInterface)
            {
                string name = Enum.GetName(typeof(PatternInterface), (object)patternInterface);

                if (patternInterface == PatternInterface.Invoke || name == "Toggle")
                {
                    return((object)this);
                }
                return(base.GetPattern(patternInterface));
            }
コード例 #43
0
        /// <summary>
        /// Gets the control pattern for the <see cref="ExpanderButton"/> that is associated with this <see cref="ExpanderButtonAutomationPeer"/>.
        /// </summary>
        /// <param name="patternInterface">Specifies the control pattern that is returned.</param>
        /// <returns>The control pattern for the <see cref="ExpanderButton"/> that is associated with this <see cref="ExpanderButtonAutomationPeer"/>.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.ExpandCollapse ||
                patternInterface == PatternInterface.Toggle)
            {
                return(this);
            }

            return(null);
        }
コード例 #44
0
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.DropTarget ||
                (patternInterface == PatternInterface.Selection && IsMultiselect))
            {
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #45
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            // Disable ScrollPattern implemented by ItemsControlAutomationPeer
            if (patternInterface == PatternInterface.Scroll)
            {
                return(null);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #46
0
        /// <summary>
        /// Gets the automation peer for the specified pattern interface.
        /// </summary>
        /// <param name="patternInterface">The pattern interface.</param>
        /// <returns>The automation peer.</returns>
        public override object GetPattern(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.SelectionItem ||
                patternInterface == PatternInterface.ScrollItem)
            {
                return(this);
            }

            return(null);
        }
コード例 #47
0
            protected override object GetPatternCore(PatternInterface patternInterface)
            {
                if (patternInterface == PatternInterface.Transform ||
                    patternInterface == PatternInterface.Transform2)
                {
                    return(this);
                }

                return(base.GetPatternCore(patternInterface));
            }
コード例 #48
0
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if ((patternInterface == PatternInterface.Grid) ||
                (patternInterface == PatternInterface.Table))
            {
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #49
0
        /// <inheritdoc />
        public override object GetPattern(PatternInterface patternInterface)
        {
            switch (patternInterface)
            {
            case PatternInterface.ExpandCollapse:
                return(this);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #50
0
        ///
        override public object GetPattern(PatternInterface patternInterface)
        {
            // Indeterminate ProgressBar should not support RangeValue pattern
            if (patternInterface == PatternInterface.RangeValue && ((ProgressBar)Owner).IsIndeterminate)
            {
                return(null);
            }

            return(base.GetPattern(patternInterface));
        }
コード例 #51
0
 /// <inheritdoc />
 protected override object GetPatternCore(PatternInterface patternInterface)
 {
     if (patternInterface == PatternInterface.MultipleView || patternInterface == PatternInterface.Table ||
         patternInterface == PatternInterface.Grid || patternInterface == PatternInterface.Selection ||
         patternInterface == PatternInterface.Value)
     {
         return(this);
     }
     return(base.GetPatternCore(patternInterface));
 }
コード例 #52
0
        /// <inheritdoc/>
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.RangeValue)
            {
                // Expose RangeValue properties.
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #53
0
        public override object GetPattern(PatternInterface patternInterface)
        {
            var state = Owner.State;

            if (patternInterface == PatternInterface.RangeValue && (state == ProgressState.Indeterminate || state == ProgressState.Busy))
            {
                return(null);
            }
            return(base.GetPattern(patternInterface));
        }
コード例 #54
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified Windows.UI.Xaml.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the Windows.UI.Xaml.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            switch (patternInterface)
            {
            case PatternInterface.SelectionItem:
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #55
0
ファイル: NumericUpDown.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// Get the automation pattern
 /// </summary>
 /// <param name="patternInterface">The pattern interface.</param>
 /// <returns>The current automation pattern interface.</returns>
 public override object GetPattern(PatternInterface patternInterface)
 {
     // If the pattern interface is a range type
     // then return this automation control.
     if (patternInterface == PatternInterface.RangeValue)
     {
         return(this);
     }
     return(base.GetPattern(patternInterface));
 }
コード例 #56
0
        // IAutomationPeerOverrides
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.ExpandCollapse ||
                patternInterface == PatternInterface.Invoke)
            {
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #57
0
        /// <inheritdoc />
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            if (patternInterface == PatternInterface.Value ||
                (this.DateTimePicker.DisplayMode != DateTimePickerDisplayMode.Inline && patternInterface == PatternInterface.ExpandCollapse))
            {
                return(this);
            }

            return(base.GetPatternCore(patternInterface));
        }
コード例 #58
0
        /// <summary>Gets the control pattern that is associated with the specified <paramref name="patternInterface" />.</summary>
        /// <param name="patternInterface">A value in the enumeration.</param>
        /// <returns>If <paramref name="patternInterface" /> is <see cref="F:System.Windows.Automation.Peers.PatternInterface.Grid" /> or <see cref="F:System.Windows.Automation.Peers.PatternInterface.Table" />, this method returns an object that implements the control pattern, otherwise this method returns <see langword="null" />.</returns>
        // Token: 0x060026AA RID: 9898 RVA: 0x000B7A74 File Offset: 0x000B5C74
        object IViewAutomationPeer.GetPattern(PatternInterface patternInterface)
        {
            object result = null;

            if (patternInterface == PatternInterface.Grid || patternInterface == PatternInterface.Table)
            {
                result = this;
            }
            return(result);
        }
コード例 #59
0
        /// <summary>
        /// Gets the control pattern that is associated with the specified Windows.UI.Xaml.Automation.Peers.PatternInterface.
        /// </summary>
        /// <param name="patternInterface">A value from the Windows.UI.Xaml.Automation.Peers.PatternInterface enumeration.</param>
        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>
        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            switch (patternInterface)
            {
                case PatternInterface.Selection:
                    return this;
            }

            return base.GetPatternCore(patternInterface);
        }
コード例 #60
0
            public override object GetPattern(PatternInterface patternInterface)
            {
                switch (patternInterface)
                {
                case PatternInterface.Invoke:
                    return(this);

                default:
                    return(base.GetPattern(patternInterface));
                }
            }