routedcommand

MVVM Routed and Relay Command

What is the Difference between the RoutedCommand and RelayCommand ? When to use RoutedCommand and when to use RelayCommand in MVVM pattern ? ...

Setting Command Target in XAML

I am having a hard time understanding the CommandTarget property for a RoutedCommand. Basically, I have some static commands that have implementations in a user control (not the window). I create a commandbinding in the user control. If I declare the button in the usercontrol, then I am able to use my routed event. However, when the ...

WPF ICommand vs RoutedCommand

Let's have a button Command property bound to a custom command. When should I implement ICommand and when derive from RoutedCommand? I see that RoutedCommand implements ICommand. In which case could I need to iplement an ICommand? What about MVVM model? Which one suits better for this purpose? ...

How do the RoutedCommand constructors differ from eachother?

The RoutedCommand in WPF has 3 overloaded constructors. Consider the following: public static RoutedCommand AddTextFieldCommand = new RoutedCommand(); vs public static RoutedCommand AddTextFieldCommand = new RoutedCommand("AddTextField", typeof(DesignerWindow)); What advantage does the second one have? Does it make it easier to d...

Unable to implement ICommandSource in VB

Hello! Has anyone ever tried to implement ICommandSource with VB? The examples provided by Microsoft are in C#, and since VB doesn't allow implicit implementation this interface is like inachievable in VB!! http://msdn.microsoft.com/en-us/library/ms771361.aspx ...

WPF menus with shortcuts and custom RoutedCommand

Im new to WPF so i might be missing something. I have a simple function in my MainWindow class called StartService. I wanted to add a menu item "Start Service" with a shortcut Ctrl+S to my application. I had to do the following: In my MainWindow class i had to define: public static RoutedCommand StartServiceRoutedCmd = new RoutedComma...