Class VisualContainer.VisualCollection
A collection of System.Windows.Media.Visual objects. Adding and removing elements through the this collection does not trigger calls to InvalidateMeasure in the parent container.
Inheritance
Implements
Namespace: Syncfusion.Windows.Controls.Scroll
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class VisualCollection : Object, IList<Visual>, ICollection<Visual>, IEnumerable<Visual>, IEnumerable, IDisposable
Constructors
VisualCollection(VisualContainer)
Initializes a new instance of the VisualContainer.VisualCollection class.
Declaration
public VisualCollection(VisualContainer owner)
Parameters
Type | Name | Description |
---|---|---|
VisualContainer | owner | The owner. |
Properties
Count
Gets the number of elements contained in the VisualContainer.VisualCollection.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
IsReadOnly
Gets a value indicating whether the VisualContainer.VisualCollection is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32]
Gets or sets the System.Windows.Media.Visual at the specified index.
Declaration
public Visual this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
System.Windows.Media.Visual |
Methods
Add(Visual)
Adds an item to the VisualContainer.VisualCollection.
Declaration
public void Add(Visual item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual | item | The object to add to the VisualContainer.VisualCollection. |
Clear()
Removes all items from the VisualContainer.VisualCollection.
Declaration
public void Clear()
Contains(Visual)
Determines whether the VisualContainer.VisualCollection contains a specific value.
Declaration
public bool Contains(Visual item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual | item | The object to locate in the VisualContainer.VisualCollection. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
CopyTo(Visual[], Int32)
Copies the elements of the VisualContainer.VisualCollection to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(Visual[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual[] | array | The one-dimensional System.Array that is the destination of the elements copied from VisualContainer.VisualCollection. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException |
|
Dispose()
Declaration
public void Dispose()
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<Visual> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Windows.Media.Visual> | A enumerator that can be used to iterate through the collection. |
IndexOf(Visual)
Determines the index of a specific item in the System.Windows.Media.Visual.
Declaration
public int IndexOf(Visual item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual | item | The object to locate in the System.Windows.Media.Visual. |
Returns
Type | Description |
---|---|
System.Int32 | The index of |
Insert(Int32, Visual)
Inserts an item to the System.Windows.Media.Visual at the specified index.
Declaration
public void Insert(int index, Visual item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
System.Windows.Media.Visual | item | The object to insert into the System.Windows.Media.Visual. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
Remove(Visual)
Removes the first occurrence of a specific object from the VisualContainer.VisualCollection.
Declaration
public bool Remove(Visual item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Visual | item | The object to remove from the VisualContainer.VisualCollection. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
RemoveAt(Int32)
Removes the System.Windows.Media.Visual item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|