[英]Visual inheritance for RadGridViews event handling possible?
I have 2 projects: 我有2个项目:
Now the situation is so: 现在的情况是这样的:
So my question is twofold there but comes down to the basic question if event handling is possible for visually inheritted RadGridViews: 所以我的问题是双重的,但归结为一个基本问题,即是否可以对可视继承的RadGridViews进行事件处理:
That is if these two things are possible at all. 那就是说,如果这两种事情都是可能的话。
You can expose the child controls contained in your UserControl as a public property, that is creating a public property that returns the child control and not just making the child variable public. 您可以将UserControl中包含的子控件公开为公共属性,即创建一个返回该子控件的公共属性,而不仅仅是使子变量公开。 This will make the child control available to sink event handlers and set public properties.
这将使子控件可用于接收事件处理程序并设置公共属性。 Note that this breaks one of object orientation rules namely, encapsulation....but rules are meant to be broken for certain cases that fits the requirement :)
请注意,这违反了面向对象的规则之一,即Encapsulation ....,但是在某些情况下要打破规则才能满足要求:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.