Hello,
I was wondering how a window opened through ShowDialog is treated in the Visual Tree.
For example, Window A opens Window B through a ShowDialog. When firing a routed command on Window B, Window A does not receieve the command (even though it is listening for it).
Is there any way to make this work?
Thanks!
Jon
...
Hello,
I've placed in a ItemsControl Container (Template Stackpanel) my UserControls, which get dynamically added and removed while running the application.
How can I route an Event (e.g. TextChanged or GotFocus) trough all elements in my UserControl (consists mainly of TextBoxes)?
Is this where I should use "Delegates" or ICommand? I'm...
I use the MVVM pattern and I have the following code:
<DataTemplate x:Key="ActivityEditTemplate">
<ItemsControl ItemsSource="{Binding Path=ActivityList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Margin="2,0,2,0" Content="{Binding ActivityDescrip...
Hello,
I've a UserControl which contains a TextBox called myTextBox. This UserControl is placed in a MainWindow.xaml where I'm trying to catch the "UIElement.PreviewKeyUp".
Now when debugging, I can see the "UserControl" as sender, not the TextBox. How can I check if the KeyEventArgs e (especially e.Key) were sent from the TextBox call...
I mean the following:
I have a custom control which has StateChangedEvent:
public class WindowControl : ContentControl
{
public static readonly RoutedEvent StateChangedEvent;
static WindowControl()
{
WindowControl.StateChangedEvent = EventManager.RegisterRoutedEvent("StateChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), ty...
I mean if i have some custom event with bubbling strategy, then who must declare preview event and who must care about its raising? Me or WPF?
for example I has class with event
public class WindowControl : ContentControl
{
public static readonly RoutedEvent StateChangedEvent;
static WindowControl()
{
WindowControl.StateChangedEvent ...
Application.Current.RootVisual.KeyDown += Application_KeyDown
The above does not work if I'm on a ChildWindow - that was instantiated in runtime. My question is, how do I get the mousemove or keydown event in the Parent Window that hosts this ChildWindow?
Also, I'd rather not change anything in the childwindow (i.e., add an event that...
Hi,
I need some help to implement a common behavior in some controls.
In my WPF application, I have a main form that contains a panel and a button:
Ok
The button will run a Save method when clicked.The Save method reads some data from the form and saves the data to...
So what I want to accomplish is that I have a listbox of items (for example: items in a basket) and when I mouse over one of them, I want to see a detailed view in another part of my window (with image and all that).
BASICALLY what I did works - but there are three things that I don't like:
a) I use "ItemsControl" so I have to bind the...
I've small trouble. I don't know why my controls firing events twice. I know it was discussed few times on stackOverflow, but still i cannot find out cause.
Is there any way to debug application and find what is the main cause of raised event? I'm not good at (at this moment) profiling, but mayby it's the good path.
Thx
...