I'm new in WPF, implementing application using reactiveUI. I have one button and added command handler for it. want to call the method only when canExecute is true.
in viewmodel, i have defined it
public bool canExecute
{
get { return _canExecute;}
set { _canExecute = value;}
}
Bind()
{
AddRecord = new ReactiveCommand(_canExecute);
AddRecord .Subscribe(x =>
{
AddR()
}
}
void AddR()
{
}
but its not working. how to convert it in to System.IObservable?