Here is my code from the View.xaml.cs:
private RelayCommand _closeCommand; public ICommand CloseCommand { get { if (_closeCommand == null)
for binding cross visual tree, refer to
Binding Visibility for DataGridColumn in WPF
or jsut try search BindingProxy