UIElementCollection Sınıf
Tanım
public ref class UIElementCollection : System::Collections::IList
public class UIElementCollection : System.Collections.IList
type UIElementCollection = class
interface ICollection
interface IEnumerable
interface IList
type UIElementCollection = class
interface IList
interface ICollection
interface IEnumerable
Public Class UIElementCollection
Implements IList
- Devralma
-
UIElementCollection
- Uygulamalar
Örnekler
Aşağıdaki örnek, Add bir üst öğeye alt içerik eklemek için yöntemini kullanır StackPanel .The following example uses the Add method to add child content to a parent StackPanel. Bunu Children , türünde olan özelliğini kullanarak yapabilirsiniz UIElementCollection .You do this by using the Children property, which is of type UIElementCollection.
void AddButton(object sender, MouseButtonEventArgs e)
{
sp1.Children.Clear();
btn = new Button();
btn.Content = "New Button";
sp1.Children.Add(btn);
}
Açıklamalar
PanelTemel sınıf, UIElementCollection alt öğelerinin koleksiyonunu temsil etmek için bir kullanır.The Panel base class uses a UIElementCollection to represent its collection of child elements. Tarafından tanımlanan Yöntemler ve özellikler, UIElementCollection öğesinden türetilmiş tüm nesneleri etkiler Panel ve alt öğelerin düzenlemesi için ortak bir özellik kümesi tanımlar Panel .Methods and properties defined by the UIElementCollection affect all objects derived from Panel and define a common feature-set for the manipulation of Panel child elements.
UIElementCollection, Kendi bağlamına (sınıf) benzeşimine sahiptir.A UIElementCollection has affinity to its own context (class). Koleksiyona sahip olan bağlamdan erişmeniz gerekir Panel .You must access the collection from the context of the owning Panel.
Oluşturucular
UIElementCollection(UIElement, FrameworkElement) |
UIElementCollection sınıfının yeni bir örneğini başlatır.Initializes a new instance of the UIElementCollection class. |
Özellikler
Capacity |
İçerebildiği öğelerin sayısını alır veya ayarlar UIElementCollection .Gets or sets the number of elements that the UIElementCollection can contain. |
Count |
Koleksiyondaki öğelerin gerçek sayısını alır.Gets the actual number of elements in the collection. |
IsSynchronized |
ICollectionArabirime erişimin eşitlenip eşitlenmediğini (iş parçacığı açısından güvenli) gösteren bir değer alır.Gets a value that indicates whether access to the ICollection interface is synchronized (thread-safe). |
Item[Int32] |
UIElementÖğesinin sıfır tabanlı dizin konumunda depolanan öğesini alır veya ayarlar UIElementCollection .Gets or sets the UIElement stored at the zero-based index position of the UIElementCollection. |
SyncRoot |
Arabirime erişimi eşleştirmek için kullanabileceğiniz bir nesne alır ICollection .Gets an object that you can use to synchronize access to the ICollection interface. |
Yöntemler
Add(UIElement) |
Belirtilen öğesini öğesine ekler UIElementCollection .Adds the specified element to the UIElementCollection. |
Clear() |
Tüm öğeleri bir öğesinden kaldırır UIElementCollection .Removes all elements from a UIElementCollection. |
ClearLogicalParent(UIElement) |
Öğe bir ayrıldığında bir öğenin mantıksal üst öğesini temizler UIElementCollection .Clears the logical parent of an element when the element leaves a UIElementCollection. |
Contains(UIElement) |
Belirtilen öğenin içinde olup olmadığını belirler UIElementCollection .Determines whether a specified element is in the UIElementCollection. |
CopyTo(Array, Int32) |
Belirli bir UIElement UIElementCollection dizin konumundan başlayarak bir öğesinden bir diziye kopyalar.Copies a UIElement from a UIElementCollection to an array, starting at a specified index position. |
CopyTo(UIElement[], Int32) |
Belirli bir UIElement UIElementCollection dizin konumundan başlayarak bir öğesinden bir diziye kopyalar.Copies a UIElement from a UIElementCollection to an array, starting at a specified index position. |
Equals(Object) |
Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object. (Devralındığı yer: Object) |
GetEnumerator() |
Yineleyebilir bir Numaralandırıcı döndürür UIElementCollection .Returns an enumerator that can iterate the UIElementCollection. |
GetHashCode() |
Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function. (Devralındığı yer: Object) |
GetType() |
TypeGeçerli örneği alır.Gets the Type of the current instance. (Devralındığı yer: Object) |
IndexOf(UIElement) |
İçindeki belirtilen öğenin dizin konumunu döndürür UIElementCollection .Returns the index position of a specified element in a UIElementCollection. |
Insert(Int32, UIElement) |
Belirtilen dizin konumundaki öğesine bir öğesi ekler UIElementCollection .Inserts an element into a UIElementCollection at the specified index position. |
MemberwiseClone() |
Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object. (Devralındığı yer: Object) |
Remove(UIElement) |
Belirtilen öğeyi bir öğesinden kaldırır UIElementCollection .Removes the specified element from a UIElementCollection. |
RemoveAt(Int32) |
UIElementBelirtilen dizinde öğesini kaldırır.Removes the UIElement at the specified index. |
RemoveRange(Int32, Int32) |
Bir öğe aralığını bir öğesinden kaldırır UIElementCollection .Removes a range of elements from a UIElementCollection. |
SetLogicalParent(UIElement) |
İçindeki bir öğenin mantıksal üst öğesini ayarlar UIElementCollection .Sets the logical parent of an element in a UIElementCollection. |
ToString() |
Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object. (Devralındığı yer: Object) |
Belirtik Arabirim Kullanımları
IList.Add(Object) |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz Add(Object) ..For a description of this member, see Add(Object). |
IList.Contains(Object) |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz Contains(Object) ..For a description of this member, see Contains(Object). |
IList.IndexOf(Object) |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz IndexOf(Object) ..For a description of this member, see IndexOf(Object). |
IList.Insert(Int32, Object) |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz Insert(Int32, Object) ..For a description of this member, see Insert(Int32, Object). |
IList.IsFixedSize |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz IsFixedSize ..For a description of this member, see IsFixedSize. |
IList.IsReadOnly |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz IsReadOnly ..For a description of this member, see IsReadOnly. |
IList.Item[Int32] |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz Item[Int32] ..For a description of this member, see Item[Int32]. |
IList.Remove(Object) |
Bu tür veya üye altyapıyı destekler Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) ve doğrudan kodunuzdan kullanılmaya yönelik değildir.This type or member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Bu üyenin açıklaması için bkz Remove(Object) ..For a description of this member, see Remove(Object). |
Uzantı Metotları
Cast<TResult>(IEnumerable) |
Öğesinin öğelerini IEnumerable belirtilen türe yayınlar.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Öğesinin öğelerini IEnumerable belirtilen bir türe göre filtreler.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Bir sorgunun paralelleştirilmesini mümkün hale getirme.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Bir IEnumerable öğesine dönüştürür IQueryable .Converts an IEnumerable to an IQueryable. |