Class UIElementsRecycler<T>
Contains utility methods to add and remove elements inside a panel.
Inheritance
System.Object
UIElementsRecycler<T>
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.WPF.dll
Syntax
public class UIElementsRecycler<T> : IEnumerable<T>, IEnumerable where T : FrameworkElement
Type Parameters
Name |
---|
T |
Constructors
UIElementsRecycler()
Constructor
Declaration
public UIElementsRecycler()
UIElementsRecycler(Panel)
Constructor
Declaration
public UIElementsRecycler(Panel panel)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.Panel | panel |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Properties
BindingProvider
Gets the binding objects to be attached with the generated FrameworkElement.
Declaration
public Dictionary<DependencyProperty, Binding> BindingProvider { get; }
Property Value
Type |
---|
System.Collections.Generic.Dictionary<System.Windows.DependencyProperty, System.Windows.Data.Binding> |
Count
Gets the value of CLR property.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
Item[Int32]
Return the panel's child at the corresponding index
Declaration
public T this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
T |
Panel
Gets the panel
Declaration
public Panel Panel { get; }
Property Value
Type |
---|
System.Windows.Controls.Panel |
Methods
Add(T)
Method used to add a element in the panel.
Declaration
public void Add(T element)
Parameters
Type | Name | Description |
---|---|---|
T | element |
Clear()
Clears the generated elements
Declaration
public void Clear()
CreateNewInstance()
Creates a new instance of the specified type
Declaration
public T CreateNewInstance()
Returns
Type |
---|
T |
GenerateElements(Int32)
Generates or recycles the elements
Declaration
public void GenerateElements(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Number of elements to be generated |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
IndexOf(T)
Indexes the of.
Declaration
public int IndexOf(T element)
Parameters
Type | Name | Description |
---|---|---|
T | element | The element. |
Returns
Type |
---|
System.Int32 |
Remove(T)
Method used to remove the element from the panel.
Declaration
public void Remove(T element)
Parameters
Type | Name | Description |
---|---|---|
T | element |
RemoveBinding(DependencyProperty)
Removes the particular binding from the generated elements
Declaration
public void RemoveBinding(DependencyProperty property)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyProperty | property |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable