我有一个声明了命令的用户控件:
public static readonly DependencyProperty CommandProperty =
DependencyProperty.Register("Command", typeof(ICommand), typeof(MyUserControl));
public ICommand Command
{
get { return (ICommand) GetValue(CommandProperty); }
set { SetValue(CommandProperty, value); }
}
该命令由父UI指定。
如何将UserControl的IsEnabled属性绑定到该命令的可用性?