开发者

What should be owner type of a routed command?

I am using 开发者_开发技巧wpf Custom Commands. While writing a custom Command, one need to define the owner type. It's Description says that it is the type that is registering the command. I was seeing some sample of custom commands and there the Owner type was UIElement and in some others it was the class name itself. Whats the difference? What should be the owner type?


There is a similar question and its answer might help. Personally I've always thought of it like a namespace in case there are duplicate commands floating about. But I might have just been trying to attach meaning to it for no reason. I always just make it the type that declares the command.


I don't think it really matters. Typically it will be the type in which the command is declared and created

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜