CommandBindingCollection CommandBindingCollection CommandBindingCollection CommandBindingCollection Class

정의

CommandBinding 개체의 컬렉션을 나타냅니다.Represents a collection of CommandBinding objects.

public ref class CommandBindingCollection sealed : System::Collections::IList
public sealed class CommandBindingCollection : System.Collections.IList
type CommandBindingCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public NotInheritable Class CommandBindingCollection
Implements IList
상속
CommandBindingCollectionCommandBindingCollectionCommandBindingCollectionCommandBindingCollection
구현

예제

다음 예제에서는 CommandBinding 에 추가 합니다 CommandBindingCollectionWindow합니다.The following example creates a CommandBinding and adds it to the CommandBindingCollection of a Window.

<Window x:Class="SDKSamples.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:custom="clr-namespace:SDKSamples"
    Height="600" Width="800"
    >
  <Window.CommandBindings>
    <CommandBinding Command="{x:Static custom:Window1.CustomRoutedCommand}"
                    Executed="ExecutedCustomCommand"
                    CanExecute="CanExecuteCustomCommand" />
  </Window.CommandBindings>
CommandBinding customCommandBinding = new CommandBinding(
    CustomRoutedCommand, ExecutedCustomCommand, CanExecuteCustomCommand);

// attach CommandBinding to root window
this.CommandBindings.Add(customCommandBinding);
Dim customCommandBinding As New CommandBinding(CustomRoutedCommand, AddressOf ExecutedCustomCommand, AddressOf CanExecuteCustomCommand)

' attach CommandBinding to root window
Me.CommandBindings.Add(customCommandBinding)

설명

파생 되는 모든 개체 UIElementCommandBindingCollection 라는All objects which derive from UIElement have a CommandBindingCollection named

CommandBindings.CommandBindings.

생성자

CommandBindingCollection() CommandBindingCollection() CommandBindingCollection() CommandBindingCollection()

CommandBindingCollection 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the CommandBindingCollection class.

CommandBindingCollection(IList) CommandBindingCollection(IList) CommandBindingCollection(IList) CommandBindingCollection(IList)

지정된 CommandBindingCollection의 항목을 사용하여 IList 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the CommandBindingCollection class using the items in the specified IList.

속성

Count Count Count Count

CommandBinding에 있는 CommandBindingCollection 항목의 수를 가져옵니다.Gets the number of CommandBinding items in this CommandBindingCollection.

IsFixedSize IsFixedSize IsFixedSize IsFixedSize

CommandBindingCollection의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether this CommandBindingCollection has a fixed size.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

CommandBindingCollection이 읽기 전용인지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether this CommandBindingCollection is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

CommandBindingCollection에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether access to this CommandBindingCollection is synchronized (thread-safe).

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

지정된 인덱스에 있는 CommandBinding를 가져오거나 설정합니다.Gets or sets the CommandBinding at the specified index.

SyncRoot SyncRoot SyncRoot SyncRoot

CommandBindingCollection에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.Gets an object that can be used to synchronize access to the CommandBindingCollection.

메서드

Add(CommandBinding) Add(CommandBinding) Add(CommandBinding) Add(CommandBinding)

지정된 CommandBinding를 이 CommandBindingCollection에 추가합니다.Adds the specified CommandBinding to this CommandBindingCollection.

AddRange(ICollection) AddRange(ICollection) AddRange(ICollection) AddRange(ICollection)

지정된 ICollection의 항목을 이 CommandBindingCollection의 끝에 추가합니다.Adds the items of the specified ICollection to the end of this CommandBindingCollection.

Clear() Clear() Clear() Clear()

CommandBindingCollection에서 모든 항목을 제거합니다.Removes all items from this CommandBindingCollection.

Contains(CommandBinding) Contains(CommandBinding) Contains(CommandBinding) Contains(CommandBinding)

지정된 CommandBinding가 이 CommandBindingCollection에 포함되는지 여부를 확인합니다.Determines whether the specified CommandBinding is in this CommandBindingCollection.

CopyTo(CommandBinding[], Int32) CopyTo(CommandBinding[], Int32) CopyTo(CommandBinding[], Int32) CopyTo(CommandBinding[], Int32)

대상 배열의 지정된 인덱스부터 시작하여 CommandBindingCollection의 모든 항목을 지정된 1차원 배열에 복사합니다.Copies all of the items in the CommandBindingCollection to the specified one-dimensional array, starting at the specified index of the target array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

CommandBindingCollection을 반복하는 열거자를 가져옵니다.Gets an enumerator that iterates through this CommandBindingCollection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
IndexOf(CommandBinding) IndexOf(CommandBinding) IndexOf(CommandBinding) IndexOf(CommandBinding)

CommandBinding에서 첫 번째로 나타나는 지정된 CommandBindingCollection을 검색합니다.Searches for the first occurrence of the specified CommandBinding in this CommandBindingCollection.

Insert(Int32, CommandBinding) Insert(Int32, CommandBinding) Insert(Int32, CommandBinding) Insert(Int32, CommandBinding)

CommandBinding의 지정된 인덱스 위치에 지정된 CommandBindingCollection을 삽입합니다.Inserts the specified CommandBinding into this CommandBindingCollection at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(CommandBinding) Remove(CommandBinding) Remove(CommandBinding) Remove(CommandBinding)

CommandBinding에서 지정된 CommandBindingCollection의 첫 번째 항목을 제거합니다.Removes the first occurrence of the specified CommandBinding from this CommandBindingCollection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

CommandBinding의 지정된 인덱스에 있는 지정된 CommandBindingCollection을 제거합니다.Removes the specified CommandBinding at the specified index of this CommandBindingCollection.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

명시적 인터페이스 구현

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

이 멤버에 대한 설명은 CopyTo(Array, Int32)를 참조하세요.For a description of this member, see CopyTo(Array, Int32).

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

이 멤버에 대한 설명은 Add(Object)를 참조하세요.For a description of this member, see Add(Object).

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

이 멤버에 대한 설명은 Contains(Object)를 참조하세요.For a description of this member, see Contains(Object).

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

이 멤버에 대한 설명은 IndexOf(Object)를 참조하세요.For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

이 멤버에 대한 설명은 Insert(Int32, Object)를 참조하세요.For a description of this member, see Insert(Int32, Object).

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

이 멤버에 대한 설명은 Item[Int32]를 참조하세요.For a description of this member, see Item[Int32].

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

이 멤버에 대한 설명은 Remove(Object)를 참조하세요.For a description of this member, see Remove(Object).

확장 메서드

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.Converts an IEnumerable to an IQueryable.

적용 대상

추가 정보