Questions tagged [routedevent]

A routed event is a type of event that can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event.

53 questions
0
votes
2 answers

WPF - understanding RoutedEvents

Hi I'm learnign WPF and currently I'm reading about RoutedEvents. In book "Pro WPF in c#" there is some snipet of code which I present below
wpfnewbie
  • 1
  • 1
0
votes
1 answer

How to override PreviewKeyDown on a TextBox?

I have a handler for the PreviewKeyDown event on a TextBox inside a control I made, which checks to see if the user has pressed the down key. The event handler correctly handles the key press when the control sits inside a layout container like a…
0
votes
2 answers

Add a delay to OnContactDown events for Surface controls

We're using the Controls.PreviewContactDown, PreviewContactUp, and PreviewContactChanged events to capture tagged items being placed, removed, and moved on the Surface, which works great in the Simulator application that comes with the surface. On…
RTigger
  • 1,360
  • 10
  • 11
0
votes
1 answer

How do I use CallMethodAction to call a method inside the viewmodel when a custom routed event is fired from inside the usercontrol?

I have a UserControl with a registered routed event: public static readonly RoutedEvent OnVisualChartRangeChangedEvent = EventManager.RegisterRoutedEvent("OnVisualChartRangeChanged", RoutingStrategy.Bubble,…
0
votes
1 answer

Who handled my event

I have registered to a LostFocus event on a TextBox and yet the event is not catch - my guess is that someone else handled it. I've tried using snoop but it only shows me the MouseDown and MouseUp events (and I need the LostFocus). Any ideas on how…
shahar eldad
  • 861
  • 1
  • 12
  • 31
0
votes
1 answer

How do I implement wpf keybinding

I want to be able to allow users to change hotkeys at runtime. Does anyone have a concrete example on how to bind a key in codebehind c# to accomplish this? I assume I have to do a keybinding with a RoutedCommand. Assume that I want to push a…
0
votes
2 answers

Passing data between different views

I am writing a WPF application in C# according to the MVVM model. I have a MainWindow which consists of several views: MenuView, ContentView1, ContentView2, . . . and so on. The MenuView, ContentView1, ContentView2 . . ., are all cousins (not…
Dazy Jackson
  • 85
  • 1
  • 4
  • 12
0
votes
1 answer

WPF handling RoutedEvent from UserControl

I have a UserControl, default one generated by VS, only TextBlock is added:
Elmo
1 2 3
4