开发者

How can I wire up commands when a control is dragged from the toolbox (WPF)

开发者 https://www.devze.com 2023-02-10 11:08 出处:网络
I\'m developing a user control.My control should be visibl开发者_StackOverflow中文版e whenever the user presses ALT + S anywhere in the active Window.I\'m going to use an ICommand and input bindings t

I'm developing a user control. My control should be visibl开发者_StackOverflow中文版e whenever the user presses ALT + S anywhere in the active Window. I'm going to use an ICommand and input bindings to achieve this.

My question is: how can I wire this code up when a developer drags my control from the toolbox to their Window design surface? I know the code I want to generate (Window.CommandBindings etc) but don't know how to make that happen from the toolbox.

Is there a way to do this? Thanks!


This might be useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消