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
0
votes
1 answer
Set BorderBrush property color for border on left button mouse click in WPF
First of all,sorry I am very new in WPF...
I have a button with a border around it. Now, bottom border change color to orange on mouse over the button but now I need to change bottom border color to green on mouse click (left button mouse) without…

Willy
- 9,848
- 22
- 141
- 284
0
votes
1 answer
How to prevent the twice-call of Closing event without using e.Handled=true?
I have a handler for Closing event of a tab, it shows a confirm closing message.
if the user choose No, I set e.Handled = true; but if he chooses Yes close, I remove the tab from the tab list and do other stuff,
when the method reaches its end, it…

mshwf
- 7,009
- 12
- 59
- 133
0
votes
1 answer
What's the preferred method of reacting to a selected item change using the TreeView?
What's the preferred method of updating other controls when a TreeViewItem has been selected?
Currently I have the following structure in my TreeView
DataStoreType - (DataStoreTypeViewModel)
DataStoreEntry - (DataStoreEntryViewModel)
…

Kieron
- 26,748
- 16
- 78
- 122
0
votes
1 answer
UWP WebView with "glass" layer not receiving pointer/touch events
I would like to apply a semi-transparent "glass" layer over a portion of a WebView, similar to this:
XAML:

user4698855
- 2,877
- 2
- 16
- 9
0
votes
0 answers
Canvas, instead of image, reacts on routed event
I have an application using WPF, Caliburn and PDF tron. It draws image pages and alows brosing through them. Browsing can be done several ways, by specific button or by hitting particular canavas area. Part of drawn area are small icons for active…

Pepsin
- 23
- 8
0
votes
1 answer
Raising event in WPF
I'd like to raise a routed event in WPF manually.
So I called my control's RaiseEvent method.
My question is:
In this case, do I need to tunnel/bubble this event myself or WPF does it for me?

Idov
- 5,006
- 17
- 69
- 106
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 does property value inheritance work in WPF?
According to MSDN, The property value inheritance enables child elements in a tree of elements to obtain the value of a particular property from parent elements, inheriting that value as it was set anywhere in the nearest parent element.
Please find…

heyUser
- 23
- 1
- 4
0
votes
0 answers
In WPF, why is my "Content Changed" custom routed event works only when the content changes outside of the frame?
I have this custom Frame class:
public class cstmFrame : Frame
{
public static readonly RoutedEvent ContentChangedEvent = EventManager.RegisterRoutedEvent("ContentChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler),…

Michael Haddad
- 4,085
- 7
- 42
- 82
0
votes
1 answer
WPF TextBoxBase property missing (and others too)
I could not resolve the issue, that the TextBoxBase property is missing from controls. If I make a TextBox, I can define the TextBoxbase property, but nowhere else. If I write TextBoxBase.TextChanged="Window_TextChanged" in the window element, then…

Daniel
- 126
- 1
- 12
0
votes
1 answer
How do I get the column index of parent control of control that sent the routed event?
I have a UserControl on my form with a Button that when clicked, adds another instance of the UserControl or a different UserControl in a new row or column. What I'm trying to do is when the Button is clicked, find out what column the UserControl…

user3258394
- 27
- 7
0
votes
0 answers
Add reference parameter to RoutedEventHandler
How can I add a reference parameter to a RoutedEventHandler method?
I know that I can add a parameter with lambda like this:
check.Checked += (s, e) => Checkbox_Checked(s, e, additionalParameter);
However if I want to add a reference to the…

Revils
- 1,478
- 1
- 14
- 31
0
votes
2 answers
Custom Mark-up Extensions return RoutedEvents
I'm trying to create a generalized event for my Close buttons, where they have to close the window but before that set focus to the owner window. I don't want to have an event for every file for that, because that'd be pretty unpractical since I…

Conrad Clark
- 4,533
- 5
- 45
- 70
0
votes
1 answer
Can I communicate from child viewmodels to main window with a routed command or routed event?
I'm building an MVVM WPF application with a custom dialog box control that resides in and is managed by the main window. I'd like to be able to launch this dialog from anywhere in the application (e.g. from a viewmodel belonging to some child view…

user1454265
- 868
- 11
- 25
0
votes
1 answer
WPF, what kind of controls will handle MouseLeftButtonDown event?
I have a DataGridControl,and its cell's DataTemplate overwritten to TextBoxs,by clicking outside the cells but still on the DataGrid, I want the TextBox to lose Keyboard focus so that it can Commit the change, but it seems the DataGrid won't handle…

Chris
- 51
- 6