Just bind the IsEnabled property of the Button to CanClose:
<Button IsEnabled="{Binding CanClose}"/>
More Related Contents:
- Bind datagrid column visibility MVVM
- Set focus on TextBox in WPF from view model
- XAML binding not working on dependency property?
- How to hide close button in WPF window?
- Select multiple items from a DataGrid in an MVVM WPF project
- ReSharper WPF error: “Cannot resolve symbol “MyVariable” due to unknown DataContext”
- using of INotifyPropertyChanged
- Implement Validation for WPF TextBoxes
- WPF TreeView HierarchicalDataTemplate – binding to object with multiple child collections
- ListBox items return string, when DataTemplate is Button
- Selecting a Textbox Item in a Listbox does not change the selected item of the listbox
- In WPF can you filter a CollectionViewSource without code behind?
- Use StringFormat to add a string to a WPF XAML binding
- How can I set the color of a selected row in DataGrid
- the name does not exist in the namespace clr-namespace
- WPF Error 40 BindingExpression path error: property not found on ‘object’
- Create Key binding in WPF
- Cannot find source for binding with reference ‘RelativeSource FindAncestor’ [duplicate]
- How to sort TreeView items using SortDescriptions in Xaml?
- DataBinding in WPF?
- Handling the window closing event with WPF / MVVM Light Toolkit
- OneWayToSource Binding seems broken in .NET 4.0
- How to display items in Canvas through Binding
- WPF OpenFileDialog with the MVVM pattern? [duplicate]
- DataGrid row content vertical alignment
- Could not load file or assembly ‘System.Windows.Interactivity’ [duplicate]
- Using a XAML file as a vector Image Source
- WPF C# InputBox
- Binding Commands to Events?
- How do you pass parameters from xaml?