本文整理汇总了C#中Panel.GetLogicalChildren方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.GetLogicalChildren方法的具体用法?C# Panel.GetLogicalChildren怎么用?C# Panel.GetLogicalChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel.GetLogicalChildren方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Child_Control_Should_Appear_In_Panel_Children
public void Child_Control_Should_Appear_In_Panel_Children()
{
var panel = new Panel();
var child = new Control();
panel.Children.Add(child);
Assert.Equal(new[] { child }, panel.Children);
Assert.Equal(new[] { child }, panel.GetLogicalChildren());
}
示例2: Removing_Child_Control_Should_Remove_From_Panel_Children
public void Removing_Child_Control_Should_Remove_From_Panel_Children()
{
var panel = new Panel();
var child = new Control();
panel.Children.Add(child);
panel.Children.Remove(child);
Assert.Equal(new Control[0], panel.Children);
Assert.Equal(new ILogical[0], panel.GetLogicalChildren());
}
示例3: Setting_Children_Should_Make_Controls_Appear_In_Panel_Children
public void Setting_Children_Should_Make_Controls_Appear_In_Panel_Children()
{
var panel = new Panel();
var child = new Control();
panel.Children = new Controls { child };
Assert.Equal(new[] { child }, panel.Children);
Assert.Equal(new[] { child }, panel.GetLogicalChildren());
}