 | ControlExGetControlsT 方法 (Control, Boolean) |
Sweet 开发框架
获取所有类型为T的控件
命名空间:
SweetUI
程序集:
SweetUI (在 SweetUI.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static List<T> GetControls<T>(
this Control ctrl,
bool includeChild = false
)
where T : Control
<ExtensionAttribute>
Public Shared Function GetControls(Of T As Control) (
ctrl As Control,
Optional includeChild As Boolean = false
) As List(Of T)
[<ExtensionAttribute>]
static member GetControls :
ctrl : Control *
?includeChild : bool
(* Defaults:
let _includeChild = defaultArg includeChild false
*)
-> List<'T> when 'T : Control
参数
- ctrl
- 类型:System.Windows.FormsControl
容器 - includeChild (Optional)
- 类型:SystemBoolean
[缺少 "M:SweetUI.ControlEx.GetControls``1(System.Windows.Forms.Control,System.Boolean)" 的 <param name="includeChild"/> 文档]
类型参数
- T
- 类型
返回值
类型:
ListT结果
备注
在 Visual Basic 和 C# 中,这个方法可以当成为类型
Control 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考
扩展方法 (Visual Basic) 或
扩展方法 (C# 编程指南) 获取更多信息。
参见