InputGestureCollection.Add(InputGesture) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen InputGesture öğesini bu InputGestureCollectionöğesine ekler.
public:
int Add(System::Windows::Input::InputGesture ^ inputGesture);
public int Add (System.Windows.Input.InputGesture inputGesture);
member this.Add : System.Windows.Input.InputGesture -> int
Public Function Add (inputGesture As InputGesture) As Integer
Parametreler
- inputGesture
- InputGesture
Koleksiyona ekleme hareketi.
Döndürülenler
0, işlem başarılı olursa (bunun eklenen öğenin dizini olmadığını unutmayın).
Özel durumlar
koleksiyon salt okunurdur.
hareketi şeklindedir null
.
Örnekler
Aşağıdaki örnek bir KeyGesture oluşturur ve öğesinin InputGestureCollection öğesine RoutedCommandekler.
<Window.InputBindings>
<KeyBinding Key="B"
Modifiers="Control"
Command="ApplicationCommands.Open" />
</Window.InputBindings>
KeyGesture OpenCmdKeyGesture = new KeyGesture(
Key.B,
ModifierKeys.Control);
ApplicationCommands.Open.InputGestures.Add(OpenCmdKeyGesture);
Dim OpenCmdKeyGesture As New KeyGesture(Key.B, ModifierKeys.Control)
ApplicationCommands.Open.InputGestures.Add(OpenCmdKeyGesture)
Şunlara uygulanır
Ayrıca bkz.
GitHub'da bizimle işbirliği yapın
Bu içeriğin kaynağı GitHub'da bulunabilir; burada ayrıca sorunları ve çekme isteklerini oluşturup gözden geçirebilirsiniz. Daha fazla bilgi için katkıda bulunan kılavuzumuzu inceleyin.