In WPF how do I implement ICommandSource to give my custom control ability to use Command from xaml?

后端 未结 2 910
野性不改
野性不改 2021-02-13 22:49

Could you please provide a sample, of how do you implement the ICommandSource interface. As I want my UserControl, which doesn\'t have the ability to S

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-13 23:28

    Your UserControl will have a code behind file cs or vb, you have to implement the interface ICommandSource, and once you implement that, in some event you will have to actually invoke the command and also check CanExecute.

提交回复
热议问题