C# Class WPF.JoshSmith.Panels.DisconnectedUIElementCollection

Inheritance: System.Windows.Controls.UIElementCollection, INotifyCollectionChanged
Afficher le fichier Open project: Warewolf-ESB/Warewolf Class Usage Examples

Méthodes publiques

Méthode Description
Add ( UIElement element ) : int

Adds the element to the DisconnectedUIElementCollection

Clear ( ) : void

Removes all elements from the DisconnectedUIElementCollection

Contains ( UIElement element ) : bool

Determines whether an element is in the DisconnectedUIElementCollection

CopyTo ( Array array, int index ) : void

Copies the collection into the Array

CopyTo ( UIElement array, int index ) : void

Strongly typed version of CopyTo

DisconnectedUIElementCollection ( UIElement owner ) : System

This collection can be used by a panel to maintain a collection of child elements that are *not* connected to their owner as visual children or logical children.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that can iterate through the collection.

IndexOf ( UIElement element ) : int

Returns the index of the element in the DisconnectedUIElementCollection

Initialize ( ) : void

The Initialize method is simply exposed as an accessible member that can be called from the ConceptualPanel's Loaded event. Accessing this member via the Children property will implicitly cause CreateUIElementCollection to be called to create the disconnected collection. This method exists because simple access of a property like Count might be optimized away by an aggressive compiler.

Insert ( int index, UIElement element ) : void

Inserts an element into the DisconnectedUIElementCollection at the specified index

Remove ( UIElement element ) : void

Removes the specified element from the DisconnectedUIElementCollection

RemoveAt ( int index ) : void

Removes the element at the specified index from the DisconnectedUIElementCollection

RemoveRange ( int index, int count ) : void

Removes the specified number of elements starting at the specified index from the DisconnectedUIElementCollection

this ( int index ) : UIElement

Private Methods

Méthode Description
BaseIndexOf ( UIElement element ) : int
BaseInsert ( int index, UIElement element ) : void
BaseRemoveAt ( int index ) : void
DisconnectedUIElementCollection ( UIElement owner, SurrogateVisualParent surrogateVisualParent ) : System
RaiseCollectionChanged ( NotifyCollectionChangedAction action, object changedItem, int index ) : void
VerifyWriteAccess ( ) : void

If the owner is an items host, we need to enforce the rule that elements cannot be explicitly added to the disconnected collection. However, it is still possible to modify the visual or logical "connected" children of a ConceptualPanel while it is an items host by simply calling the AddVisualChild, RemoveVisualChild, AddLogicalChild, or RemoveLogicalChild methods. Logic within ConceptualPanel ensures that any visual children added in this manner will be returned within a GetVisualChild() enumeration.

Method Details

Add() public méthode

Adds the element to the DisconnectedUIElementCollection
public Add ( UIElement element ) : int
element UIElement
Résultat int

Clear() public méthode

Removes all elements from the DisconnectedUIElementCollection
public Clear ( ) : void
Résultat void

Contains() public méthode

Determines whether an element is in the DisconnectedUIElementCollection
public Contains ( UIElement element ) : bool
element UIElement
Résultat bool

CopyTo() public méthode

Copies the collection into the Array
public CopyTo ( Array array, int index ) : void
array System.Array
index int
Résultat void

CopyTo() public méthode

Strongly typed version of CopyTo
public CopyTo ( UIElement array, int index ) : void
array UIElement
index int
Résultat void

DisconnectedUIElementCollection() public méthode

This collection can be used by a panel to maintain a collection of child elements that are *not* connected to their owner as visual children or logical children.
public DisconnectedUIElementCollection ( UIElement owner ) : System
owner UIElement
Résultat System

GetEnumerator() public méthode

Returns an enumerator that can iterate through the collection.
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

IndexOf() public méthode

Returns the index of the element in the DisconnectedUIElementCollection
public IndexOf ( UIElement element ) : int
element UIElement
Résultat int

Initialize() public méthode

The Initialize method is simply exposed as an accessible member that can be called from the ConceptualPanel's Loaded event. Accessing this member via the Children property will implicitly cause CreateUIElementCollection to be called to create the disconnected collection. This method exists because simple access of a property like Count might be optimized away by an aggressive compiler.
public Initialize ( ) : void
Résultat void

Insert() public méthode

Inserts an element into the DisconnectedUIElementCollection at the specified index
public Insert ( int index, UIElement element ) : void
index int
element UIElement
Résultat void

Remove() public méthode

Removes the specified element from the DisconnectedUIElementCollection
public Remove ( UIElement element ) : void
element UIElement
Résultat void

RemoveAt() public méthode

Removes the element at the specified index from the DisconnectedUIElementCollection
public RemoveAt ( int index ) : void
index int
Résultat void

RemoveRange() public méthode

Removes the specified number of elements starting at the specified index from the DisconnectedUIElementCollection
public RemoveRange ( int index, int count ) : void
index int
count int
Résultat void

this() public méthode

public this ( int index ) : UIElement
index int
Résultat UIElement