CommandBindingCollection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
CommandBinding オブジェクトのコレクションを表します。
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
- 継承
-
CommandBindingCollection
- 実装
例
次の例では、CommandBindingを作成し、CommandBindingCollectionの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)
注釈
UIElementから派生するすべてのオブジェクトには、名前付きのCommandBindingCollectionがあります
コンストラクター
| 名前 | 説明 |
|---|---|
| CommandBindingCollection() |
CommandBindingCollection クラスの新しいインスタンスを初期化します。 |
| CommandBindingCollection(IList) |
指定したCommandBindingCollection内の項目を使用して、IList クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Count |
このCommandBindingCollection内のCommandBinding項目の数を取得します。 |
| IsFixedSize |
この CommandBindingCollection のサイズが固定されているかどうかを示す値を取得します。 |
| IsReadOnly |
この CommandBindingCollection が読み取り専用かどうかを示す値を取得します。 |
| IsSynchronized |
この CommandBindingCollection へのアクセスが同期されているかどうかを示す値を取得します (スレッド セーフ)。 |
| Item[Int32] |
指定したインデックス位置にある CommandBinding を取得または設定します。 |
| SyncRoot |
CommandBindingCollectionへのアクセスを同期するために使用できるオブジェクトを取得します。 |
メソッド
明示的なインターフェイスの実装
| 名前 | 説明 |
|---|---|
| ICollection.CopyTo(Array, Int32) |
このメンバーの説明については、 CopyTo(Array, Int32)を参照してください。 |
| IList.Add(Object) |
このメンバーの説明については、 Add(Object)を参照してください。 |
| IList.Contains(Object) |
このメンバーの説明については、 Contains(Object)を参照してください。 |
| IList.IndexOf(Object) |
このメンバーの説明については、 IndexOf(Object)を参照してください。 |
| IList.Insert(Int32, Object) |
このメンバーの説明については、 Insert(Int32, Object)を参照してください。 |
| IList.Item[Int32] |
このメンバーの説明については、 Item[Int32]を参照してください。 |
| IList.Remove(Object) |
このメンバーの説明については、 Remove(Object)を参照してください。 |
拡張メソッド
| 名前 | 説明 |
|---|---|
| AsParallel(IEnumerable) |
クエリの並列化を有効にします。 |
| AsQueryable(IEnumerable) |
IEnumerable を IQueryableに変換します。 |
| Cast<TResult>(IEnumerable) |
IEnumerable の要素を指定した型にキャストします。 |
| OfType<TResult>(IEnumerable) |
指定した型に基づいて、IEnumerable の要素をフィルター処理します。 |