积极答复者
如何动态访问Grid中的成员的属性?(C++)

问题
答案
-
当然可以啊~
你可以使用下面的代码:
TextBox^ txb = static_cast<TextBox^>(grid->Children->GetAt(0)); auto text = txb->Text;
--James<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 lxylxy123456 2014年6月22日 9:02
-
已经成功,代码:
auto Child = grid->Children->GetAt(i); auto Childtype = Child->GetType(); auto UCtype = ref new Type(ref new 类名()); if (Childtype->ToString() == UCtype->ToString()){ auto UC = static_cast<Page7UserControl1^>(grid->Children->GetAt(i)); }
- 已标记为答案 lxylxy123456 2014年6月22日 9:02
全部回复
-
当然可以啊~
你可以使用下面的代码:
TextBox^ txb = static_cast<TextBox^>(grid->Children->GetAt(0)); auto text = txb->Text;
--James<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 lxylxy123456 2014年6月22日 9:02
-
已经成功,代码:
auto Child = grid->Children->GetAt(i); auto Childtype = Child->GetType(); auto UCtype = ref new Type(ref new 类名()); if (Childtype->ToString() == UCtype->ToString()){ auto UC = static_cast<Page7UserControl1^>(grid->Children->GetAt(i)); }
- 已标记为答案 lxylxy123456 2014年6月22日 9:02