InputBindingCollection Class
Represents an ordered collection of InputBinding objects.
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() | InputBindingCollection() | Initializes a new instance of the InputBindingCollection class. |
![]() | InputBindingCollection(IList) | Initializes a new instance of the InputBindingCollection class using the items in the specified IList. |
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of InputBinding items in this collection. |
![]() | IsFixedSize | Gets a value that indicates whether this InputBindingCollection has a fixed size. |
![]() | IsReadOnly | Gets a value that indicates whether this InputBindingCollection is read-only. |
![]() | IsSynchronized | Gets a value indicating whether access to this InputBindingCollection is synchronized (thread-safe). |
![]() | Item(Int32) | Gets or sets the InputBinding at the specified index. |
![]() | SyncRoot | Gets an object that can be used to synchronize access to the InputBindingCollection. |
| Name | Description | |
|---|---|---|
![]() | Add(InputBinding) | Adds the specified InputBinding to this InputBindingCollection. |
![]() | AddRange(ICollection) | Adds the items of the specified ICollection to the end of this InputBindingCollection |
![]() | Clear() | Removes all items from this InputBindingCollection. |
![]() | Contains(InputBinding) | Determines whether the specified InputBinding is in this InputBindingCollection |
![]() | CopyTo(InputBinding[], Int32) | Copies all of the items in the InputBindingCollection to the specified one-dimensional array, starting at the specified index of the target array. |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetEnumerator() | Gets an enumerator that iterates through this InputBindingCollection. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | IndexOf(InputBinding) | Searches for the first occurrence of the specified InputBinding in his InputBindingCollection. |
![]() | Insert(Int32, InputBinding) | Inserts the specified InputBinding into this InputBindingCollection at the specified index. |
![]() | Remove(InputBinding) | Removes the first occurrence of the specified InputBinding from this InputBindingCollection. |
![]() | RemoveAt(Int32) | Removes the specified InputBinding at the specified index of this InputBindingCollection. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection.CopyTo(Array, Int32) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see ICollection.CopyTo. |
![]() ![]() | IList.Add(Object) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Add. |
![]() ![]() | IList.Contains(Object) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Contains. |
![]() ![]() | IList.IndexOf(Object) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.IndexOf. |
![]() ![]() | IList.Insert(Int32, Object) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Insert. |
![]() ![]() | IList.Remove(Object) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Remove. |
![]() ![]() | IList.Item(Int32) | This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IList.Item. |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<'TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<'TResult>() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
All objects that derive from UIElement have an InputBindingCollection named InputBindings. All objects that derive from ContentElement have an InputBindingCollection named InputBindings.
However, if these collections are set in XAML, then the items in the collection must be derived classes of InputBinding rather than direct InputBinding objects. This is because InputBinding does not support a default public constructor. Therefore, the items in a InputBindingCollection that was set in XAML will typically be an InputBinding derived class that does support a default public constructor, such as KeyBinding or MouseBinding.
The following example creates a KeyGesture and associates it with a KeyBinding. The KeyBinding is added to the InputBindingCollection on a Window.
<Window.InputBindings> <KeyBinding Key="B" Modifiers="Control" Command="ApplicationCommands.Open" /> </Window.InputBindings>
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




