a way for a windows presentation foundation (WPF) class to provide notifications to clients when some interesting thing happens to the object.
Questions tagged [routed-events]
239 questions
3
votes
1 answer
WPF Button click Routed Event
I am getting the following error when trying to execute a button clcik event from xaml

Anshu Dutta
- 491
- 2
- 6
- 18
3
votes
2 answers
MenuItem.Click RoutedEvent not firing in WPF
I have a ContextMenu on a DataGrid and I'm trying to capture the MenuItem.Click event for all the menu items. Like so:

Tom Padilla
- 924
- 10
- 30
2
votes
1 answer
Using ICommand and InputBindings consistently in DataGrid
I'm trying to create a DataGrid having the following features:
Readonly Datagrid, but provide editing capabilities through double click and separate edit form (double click on specific row)
ContextMenu which calls new/edit/delete form (right click…

duedl0r
- 9,289
- 3
- 30
- 45
2
votes
1 answer
See what handled a routed event
Basically we have a huge project, and we have an event handler that sometimes is triggered and some others it isn't. I think this is because somewhere in the jungle of code, we're handling that event, so it doesn't bubble up to where we need it. Is…

Carlo
- 25,602
- 32
- 128
- 176
2
votes
2 answers
How can I listen to a RoutedEvent from a class that doesn't derive from FrameworkElement ? Can it be done?
The question says it all basically.
I want in a
class MyClass
to listen to a routed event. Can it be done ?

sirrocco
- 7,975
- 4
- 59
- 81
2
votes
1 answer
Unable to perform RoutedEventHandler
I have loop to create a column of button and now i wish to implemented the eventhandler into all the buttons but is not working.
The iteration to create a column of button
For e As Integer = 0 To 19
btnFriday(e) = New Button()
…

Carson Lee
- 2,673
- 3
- 20
- 23
2
votes
2 answers
ComboBox PreviewKeyDown doesn't fire for Return key
I'm want to conditionally prevent the Enter/Return key from selecting the highlighted item in a ComboBox drop down. So I wired up an event handler to the ComboBox.PreviewKeyDown so that I could set the Handled property, but the event handler is…

xr280xr
- 12,621
- 7
- 81
- 125
2
votes
1 answer
Routed events in silverlight 3?
I have a Control, within a control, within a control.
Like so..
QuizMaster -> Question -> Answers -> RadioButton
When one of the answers is checked I want the function in Quizmaster called AskNextQuestion() to run.
How do I do that?

Joseph Le Brech
- 6,541
- 11
- 49
- 84
2
votes
2 answers
Disable event bubbling on selectionchanged event- WPF
I have a listbox inside a listview. on Both of them I have selectionchanged event. When I fire child control event parent control fires automatically. I need to stop this behaviour.
Any hints?
Thanks!

WhoCares
- 25
- 1
- 6
2
votes
0 answers
WPF InputManager KeyDown not handled
First of all I already have a working solution I just need some explanation on what is happening here.
I have the following code:
var e = new KeyEventArgs(Keyboard.PrimaryDevice,
Keyboard.PrimaryDevice.ActiveSource,
…

Bado
- 71
- 10
2
votes
2 answers
WPF Dependency Property workaround
There are 3 UserControls under a MainWindow. Each control have it's own Save Button. The Mainwindow has a SaveAll button.
The MainWindow has a ContentControl and the content property is binded to the VM. At runtime on ButtonClickCommand, the View is…

Varun Jain
- 1,015
- 2
- 13
- 19
2
votes
1 answer
Trouble with Async Task and RoutedEventHandler in WPF/C#
I have an User Control with a Button which is used from a Window with a RoutedEventHandler:
UserControl:
public event RoutedEventHandler IniciarPLC_Click;
private void BtnIniciarPLC_Click(object sender, RoutedEventArgs e)
{
.....
if…

Ejrr1085
- 975
- 2
- 16
- 29
2
votes
1 answer
How can I prevent touch-click when touch-scrolling?
I have an ItemsControl that wraps its ItemPresenter with a ScrollViewer. That ItemPresenter displays a ListView. Therefore I have a collection within a collection.
Now, I want only the ScrollViewer to have scrolling functionality so I have gone…

JP Garza
- 212
- 3
- 16
2
votes
1 answer
Add Handler method not being called when Routed Event is attached
I'm trying to create an attached behavior to add an auto-complete list to the standard TextBox control. My goal is that every time the TextChanged event is raised, my AutoCompleteBehavior class creates a popup and fills it with potential…

Keith Stein
- 6,235
- 4
- 17
- 36
2
votes
1 answer
Why is the TextBlock not the OriginalSource on the Routed Event?
I'm showing a context menu for elements in a ListView. The context menu is attached to the TextBlocks of the ListView as follows.
…

Dennis Kuypers
- 546
- 4
- 16