I am creating a command which will have a Textbox control as target.
Code to create the command:
public class Commands
{
public static RoutedCommand Appender;
static Commands()
{
Appender = new RoutedCommand();
}
public static void AppenderExecuted(object target, ExecutedRoutedEventArgs e)
{
Sy...
Hi,
I have a user control that has 2 controls A and B within it.
Now, A and B have their own logic in their DragDrop event.
The parent that has these 2 controls has to handle the DragDrop from these events in its own way. So I have in the parent something like, parent.A.DragDropEvent += new EventHandler () etc...
Now, I want to handl...
Hi,
I tried with a minimal application, just a textbox and a button. The button is binded to a RelayCommand instance, and the CanExecute method just return true or false with a random. The textbox text is binded with a string property.
What's making me mad is that the CanExecute method is "always" called: a change of the element focus...
This menuItem because it's linked to a command does the magic behind the scenes for me:
<MenuItem Name="mnuOpen" Command="Open"/>
where I have
<Window.CommandBindings>
<CommandBinding Command="Open"
Executed="CommandBinding_Open_Executed"
CanExecute="CommandBinding_ProjectSelected"/>...
I have a usercontrol with a command, what I would like to do is execute this command from the containing view's ViewModel.
This would be easy to accomplish in the code behind, as I could just go "UserControl.MyCommand.Execute", but of course I want to be able to do this in the ViewModel.
In theory, what I would like to do is bind the U...
How can I have a Command that can be called from both a Window and a UserControl (by hitting a button in either) that uses the same execute and can-execute methods? It seems like if I have the following in my UserControl's XAML, it requires myCommandHandler and canExecuteMyCommand to be in my UserControl class:
<CommandBinding Command=...
Got a weird problem here. I have created a template for a ListBox based on the standard template (i.e. I have not changed anything other than what I indicate below).
I am trying to add a couple of buttons to the side of the template so that I can scroll the ScrollViewer (which is part of the standard ListBox template) left and right. Th...
Hi There,
I have a Silverlight application that has three regions that will host the same Views. What I want to know is, how may I create a zoom control for each of the views, without zooming all of the views (assuming the zoom action is using Prism Commands). Would IActiveAware be the right approach?
...