How do you bind a command to a MenuItem (WPF)?

后端 未结 3 1447
既然无缘
既然无缘 2020-12-30 10:59

Here is my code from the View.xaml.cs:

private RelayCommand _closeCommand;
public ICommand CloseCommand
{
    get
    {
        if (_closeCommand == null)
           


        
3条回答
  •  醉酒成梦
    2020-12-30 11:35

    for binding cross visual tree, refer to

    Binding Visibility for DataGridColumn in WPF

    or jsut try search BindingProxy

提交回复
热议问题