You could try something like this:
...Binding="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type Window}}, Path=DataContext.AllowItemCommand}" ...
More Related Contents:
- Setting DataContext within UserControl is affecting bindings in parent
- Binding to static property
- ElementName Binding from MenuItem in ContextMenu
- WPF animation: binding to the “To” attribute of storyboard animation
- Why does the binding update without implementing INotifyPropertyChanged?
- How to detect broken WPF Data binding?
- OneWayToSource binding from readonly property in XAML
- What approaches are available to dummy design-time data in WPF?
- WPF CommandParameter is NULL first time CanExecute is called
- WPF ContextMenu woes: How do I set the DataContext of the ContextMenu?
- Data binding the TextBlock.Inlines
- WPF datagrid header text binding
- What is it about DataTable Column Names with dots that makes them unsuitable for WPF’s DataGrid control?
- WPF Grid as ItemsPanel for a list dynamically bound to an ItemsControl
- WPF Binding to local variable
- How can I turn binding errors into runtime exceptions?
- WPF MVVM INotifyPropertyChanged Implementation – Model or ViewModel
- WPF: Display a bool value as “Yes” / “No”
- How can I reduce RadioButton binding code?
- How to bind a command in WPF to a double click event handler of a control?
- How do I databind a ColumnDefinition’s Width or RowDefinition’s Height?
- Does WPF databinding marshall changes to the UI Thread?
- How to bind xml to the WPF DataGrid correctly?
- Weird problem where Button does not get re-enabled unless the mouse is clicked
- Datacontext conflicts
- WPF Databind Before Saving
- Different views / data template based on member variable
- Why can’t I select a null value in a ComboBox?
- MarkupExtension that uses a DataBinding value
- Binding DynamicObject to a DataGrid with automatic column generation?