, .
:
XAML:
<Button Command="{Binding BrowseCommand}">
<AccessText>_Browse</AccessText>
</Button>
# (ViewModel):
:
BrowseCommand = new RelayCommand( BrowseCommandHandler, () => CanBrowse );
CanBrowse:
private bool _canBrowse;
public bool CanBrowse
{
get { return _canBrowse; }
set { _canBrowse = value; BrowseCommand.RaiseCanExecuteChanged(); }
}
, "RaiseCanExecuteChanged()" RelayCommand?
(Edit: , submit. , !)
, RaiseCanExecuteChanged. WPF CommandManager CanExecute, , , .. . , , CommandManager , ( ) RaiseCanExecuteChanged, , .
( )
, , , "RaiseCanExecuteChanged", . ...
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.CommandWpf;
"RaiseCanExecuteChanged()" , , .
, ...