Questions tagged [event-routing]
7 questions
22
votes
5 answers
Why doesn't button click event "bubble up visual tree" to StackPanel as MSDN article states?
In the MSDN article Understanding Routed Events and Commands In WPF, it states
an event will bubble (propagate) up the visual tree from the source element until either it has been handled or it reaches the root element.
However, in this example,…

Edward Tanguay
- 189,012
- 314
- 712
- 1,047
15
votes
3 answers
How to prevent InvokeCommandAction from propagating event to parent elements?
I realised that when using an InvokeCommandAcction associated to an EventTrigger, the original event was still routing up to the parent elements until it is handled. Well, I guess it is an expected behavior. But my question is how I can mark the…

Ucodia
- 7,410
- 11
- 47
- 81
1
vote
2 answers
Prevent KeyDown event bubbling from TextBox to MainWindow in WPF
I have a program that contains a textbox control. A user is able to enter text into this control. The user can also press certain keys to trigger other actions (this is handled on the MainWindow). I have sample XAML and C# code to demonstrate my…

Samuel Slade
- 8,405
- 6
- 33
- 55
1
vote
1 answer
Route WPF keyboard events to child DataGrid from MainWindow's PreviewKeyDown
I have a window with several single-line Textboxes and one DataGrid (.Net 4.5 on Windows8).
I'd like to route navigation events (Up/Down/PgUp/PgDn, etc) to the grid, regardless of which control has the focus.
I tried overriding PreviewKeyDown in the…

AVIDeveloper
- 2,954
- 1
- 25
- 32
0
votes
1 answer
Azure IotHub deviceTwin property changes
We are currently facing an issue with our configured Event Hub, which is set up to listen for changes in the IoT Hub device twin. Our problem arises when we update the reported section of the device twin. We have noticed that the tags associated…

Praveen E
- 1
- 1
0
votes
1 answer
Button within ListBox ItemTemplate not selecting item wpf mvvm
Hi i have the same problem as here Button within ListBox ItemTemplate not selecting item
And i know the reason why my button doesnt see selected item, it because listbox is called when MouseDown
and button is called on Click. But i dont know how to…

Arcuman
- 13
- 2
-1
votes
2 answers
Silverlight page not catching input events
I have been attempting to handle the KeyDown event of a UserControl (page) in my Silverlight application, but there seems to be some strange behaviour on the part of Silverlight user input functionality. The event is not getting raised under any…

Noldorin
- 144,213
- 56
- 264
- 302