积极答复者
向Grid控件添加子控件时的事件?

问题
答案
-
有一个事件你可以参考一下,就是LayoutUpdated事件。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Sheldon _XiaoModerator 2011年5月3日 6:10
全部回复
-
我不清楚你这样做的原因,能说一下你要这个事件做什么事情么?
我觉得你可以使用新添加的控件的Loaded事件,比如在创建控件的时候,
NewControl.Loaded += new RoutedEventHandler(NewControl_Loaded);
你可以在这个事件里面处理。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
我还是不清楚,我觉得你的需求很奇怪,不知道你是如何设计的。
首先,如果你想得到新添加控件的大小,那你在执行add的时候就获得啊,为什么要这样一个事件呢?当然Grid本身没有你要的事件。
然后,你说的当控件集合改变时的事件,那么当你add的时候 控件集合就变了啊,你在这里操作就可以了。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
有一个事件你可以参考一下,就是LayoutUpdated事件。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Sheldon _XiaoModerator 2011年5月3日 6:10
-
由于没有得到关于你问题的更新,我将关闭你的帖子为“已解决”,如果关于这个问题需要更多的讨论,可以通过回复通知我。
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.