Questions tagged [routed-events]

a way for a windows presentation foundation (WPF) class to provide notifications to clients when some interesting thing happens to the object.

239 questions
0
votes
3 answers

MouseDown event of image in usercontrol not fireing

I made a usercontrol in WPF with an image in it. I declared a MouseDown event for this image: I placed this usercontrol on my application…
Kimmax
  • 1,658
  • 21
  • 34
0
votes
0 answers

Handle and bubble up WPF Slider's KeyDown event, when value-altering key is pressed

I have a ListBox in which the ItemTemplate contains a Slider control. When we focus a Slider and press the keys up and down, it changes the value just like when pressing left and right. I would like to override this behavior - I want to cancel the…
oli.G
  • 1,300
  • 2
  • 18
  • 24
0
votes
1 answer

Routed events intellisense not working

When trying to type a Routed event inside the definition of a container control (a Grid in my example), intellisense does not work. The only way I can create the Routed Event is by writing the Envent outside of the Grid properties definition area…
user1925920
  • 43
  • 1
  • 3
0
votes
1 answer

Need to handle all routed events

I am a bit new to wpf programming and have been from web programming. while read and article about routed event Routed Event overview - Josh Smith So Do I need to handle all events necessarily In wpf do I need to put e.handled at end of each routed…
Hardik
  • 1,716
  • 6
  • 27
  • 41
0
votes
0 answers

WPF : Custom bubbling routed event never handled/catched

I have a Usercontrol (UC1) which contains a list of other UCs (UC2), i want to raise an event in my UC2 when something is modified in it and catch it in UC1, so i declared it like that : In my UC2 Class : public static readonly RoutedEvent…
Sicha
  • 139
  • 1
  • 12
0
votes
1 answer

Prevent hyperlink Click event from bubbling up

I'm designing a windows Phone app. I have a Hyperlink object in a RichTextBox, in a Grid. The Grid had a Tap event, and the Hyperlink has a Click event. Clicking the Hyperlink also raises the parent Grid's Tap event. How can I prevent this? I would…
Clément
  • 12,299
  • 15
  • 75
  • 115
0
votes
2 answers

Trigger an EventTrigger by an AttachedEvent

I have a a custom Panel that raises a RoutedEvent which is defined globally in a static class : public class CompressItemsToFitStackPanel : StackPanel { protected override Size ArrangeOverride(Size arrangeSize) { // some…
eran otzap
  • 12,293
  • 20
  • 84
  • 139
0
votes
1 answer

My Custom Event does not produce anything

I'm trying to create custom RoutedEvent in order to trigger an animation whenever the Text property of a TextBlock changes. My class inherits from TextBlock class and I shadow the Text property. I'm using a Button in order to change the Text…
apollon
  • 41
  • 1
  • 4
0
votes
1 answer

Why does my RoutedEvent use old value of DependencyProperty?

I need to raise an event on changing a DP (called CurrentItem) value of a UserControl (called MenuButton) to notify another UserControl to change its Title DP. Everything works fine except old-value of CurrentItem is used in target DP. How can I…
Mehdi
  • 2,194
  • 2
  • 25
  • 39
0
votes
2 answers

How to handle RoutedEvents in WinRT Popup

I am playing a Little with Windows 8 and building Windows Store Apps. Currently I am trying to create a popup. I want to tap on a button on a (primitive) user control which is hosted as the Child of a…
bash.d
  • 13,029
  • 3
  • 29
  • 42
0
votes
1 answer

How Event Tunneling work in WPF?

I am reading about Routed Event which is very cool concept by the way, I understand how event Bubbling work from child element toward root element but I am not sure about how event tunneling works. I have created small example where I put one…
0
votes
1 answer

WPF DataGridCell LostFocus event stops bubbling at DataGridRow

I can't quite understand what's going on with the following bit of code. It's a relatively simple wpf datagrid which displays an ObservableCollection of objects. If I select a row, and press the delete key, a LostFocus event is fired from the…
Andrew
  • 1,482
  • 9
  • 16
0
votes
1 answer

Cancel ManipulationStarting event to prevent drag&drop

There are several events which deal with manipulation (and thus drag&drop): ManipulationStarting ManipulationStarted ManipulationDelta ManipulationInertiaStarting ManipulationCompleted In the ManipulationStarting event, the event args (type…
CaptainProton
  • 193
  • 1
  • 3
  • 11
0
votes
0 answers

Windows Phone 7 Navigation

I am having a problem with navigating between a MainPage and a details Page. On the main page the code looks like this: private void MainPage_Loaded(object sender, RoutedEventArgs e) { State.Clear(); List lst = new…
0
votes
0 answers

New tab in WPF - items.add from buttons vs methods

OK, so I have a window called PictureWindow which displays pictures (I've cut out the code not related to making tabs). The TabControl is named "itemsTab". Using a button press, I can make a new tab no problem. But using the same operations inside a…
Irish Yobbo
  • 403
  • 1
  • 6
  • 21
1 2 3
15
16