WPF doesn’t update command bound controls unless it has a reason to. Clicking on the GUI causes WPF to refresh so the update then works.
You can manually cause a refresh of any command bound controls by calling CommandManager.InvalidateRequerySuggested
.
More Related Contents:
- How to bind a command in WPF to a double click event handler of a control?
- INotifyPropertyChanged vs. DependencyProperty in ViewModel
- Pushing read-only GUI properties back into ViewModel
- How to correctly bind to a dependency property of a usercontrol in a MVVM framework
- WPF CommandParameter is NULL first time CanExecute is called
- ItemsControl with multiple DataTemplates for a viewmodel
- WPF Grid as ItemsPanel for a list dynamically bound to an ItemsControl
- WPF MVVM INotifyPropertyChanged Implementation – Model or ViewModel
- Does WPF databinding marshall changes to the UI Thread?
- Executing a command on Checkbox.Checked or Unchecked
- How can I tell my DataTemplate to bind to a property in the PARENT ViewModel?
- WPF animation: binding to the “To” attribute of storyboard animation
- How to detect broken WPF Data binding?
- Passing parameters between viewmodels
- What is it about DataTable Column Names with dots that makes them unsuitable for WPF’s DataGrid control?
- WPF Binding to local variable
- How can I Have a WPF EventTrigger on a View trigger when the underlying Viewmodel dictates it should?
- How can I reduce RadioButton binding code?
- How to make all controls resize accordingly proportionally when window is maximized?
- How to bind xml to the WPF DataGrid correctly?
- WPF Databind Before Saving
- Should I bind to ICollectionView or ObservableCollection
- Different views / data template based on member variable
- How can I sort a ListBox using only XAML and no code-behind?
- WPF Context menu on left click
- WPF MvvM DataGrid Dynamic Columns
- WPF ViewModel Commands CanExecute issue
- WPF MenuItem.Command binding to ElementName results to System.Windows.Data Error: 4 : Cannot find source for binding with reference
- MenuItem style with icon creates only one icon
- How to automatically scale font size for a group of controls?