This project is read-only.

Command Service calls Delegate

Aug 28, 2009 at 8:53 PM
Edited Aug 28, 2009 at 8:54 PM


how can I use the CommandService to call a Delegate? If I click the Button, nothing happens, but in WPF it works fine.

Thank you,



Here is my code:

XAML Code:



<Button x:Name="LoginButton" Content="Login" command:CommandService.Command="{Binding GoToLogin}"/>


C# ViewModel Code:

public class LoginViewModel : ILoginViewModel
public ILoginView View {get; private set;}
public DelegateCommand<object> GoToLogin { get; set; }

private IUnityContainer _container;
private IRegionManager _regionManager;

public LoginViewModel(ILoginView view, IRegionManager regionManager, IUnityContainer container)
View = view;
View.Model = this;

_regionManager = regionManager;
_container = container;

//GoToLogin = new DelegateCommand<object>(OnGoToLogin);
GoToLogin = new DelegateCommand<object>(OnGoToLogin);

private void OnGoToLogin(object parameter)