C# Класс WPF.JoshSmith.Panels.DisconnectedUIElementCollection

Наследование: System.Windows.Controls.UIElementCollection, INotifyCollectionChanged
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Add() публичный Метод

Adds the element to the DisconnectedUIElementCollection
public Add ( UIElement element ) : int
element UIElement
Результат int

Clear() публичный Метод

Removes all elements from the DisconnectedUIElementCollection
public Clear ( ) : void
Результат void

Contains() публичный Метод

Determines whether an element is in the DisconnectedUIElementCollection
public Contains ( UIElement element ) : bool
element UIElement
Результат bool

CopyTo() публичный Метод

Copies the collection into the Array
public CopyTo ( Array array, int index ) : void
array System.Array
index int
Результат void

CopyTo() публичный Метод

Strongly typed version of CopyTo
public CopyTo ( UIElement array, int index ) : void
array UIElement
index int
Результат void

DisconnectedUIElementCollection() публичный Метод

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
Результат System

GetEnumerator() публичный Метод

Returns an enumerator that can iterate through the collection.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

IndexOf() публичный Метод

Returns the index of the element in the DisconnectedUIElementCollection
public IndexOf ( UIElement element ) : int
element UIElement
Результат int

Initialize() публичный Метод

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
Результат void

Insert() публичный Метод

Inserts an element into the DisconnectedUIElementCollection at the specified index
public Insert ( int index, UIElement element ) : void
index int
element UIElement
Результат void

Remove() публичный Метод

Removes the specified element from the DisconnectedUIElementCollection
public Remove ( UIElement element ) : void
element UIElement
Результат void

RemoveAt() публичный Метод

Removes the element at the specified index from the DisconnectedUIElementCollection
public RemoveAt ( int index ) : void
index int
Результат void

RemoveRange() публичный Метод

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
Результат void

this() публичный Метод

public this ( int index ) : UIElement
index int
Результат UIElement