'Declaration Protected Overloads Shared Function ExtractExistingElement( _ ByVal existingElements As ArrayList, _ ByVal type As Type, _ ByVal removeExtractedElement As Boolean _ ) As Object
protected static object ExtractExistingElement( ArrayList existingElements, Type type, bool removeExtractedElement )
Imports Infragistics.Win Imports System.Collections Private Function GetButtonElement(ByVal childElementsCollection As ArrayList) As Infragistics.Win.ButtonUIElement ' Check ChildElements collection to see if ' there is a button UIElement that can be used. Dim btn As ButtonUIElement = ExtractExistingElement(childElementsCollection, GetType(ButtonUIElement), True) ' If not button will be nothing in which case we will instantiate a new one. If btn Is Nothing Then btn = New ButtonUIElement(Me) End If Return btn End Function
using Infragistics.Win; using System.Collections; private Infragistics.Win.ButtonUIElement GetButtonElement(System.Collections.ArrayList childElementsCollection) { // Check ChildElements collection to see if // there is a button UIElement that can be used. Infragistics.Win.ButtonUIElement button = ExtractExistingElement(childElementsCollection, typeof(Infragistics.Win.ButtonUIElement),true) as Infragistics.Win.ButtonUIElement ; // If not button will be null in which case we will instantiate a new one. if(null == button) button = new Infragistics.Win.ButtonUIElement(this); return button; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2