[]
Gets the child controls of the panel.
[Browsable(false)]
public Control.ControlCollection InnerControls { get; }
Type | Description |
---|---|
Control.ControlCollection | The Control.ControlCollection value that represents the child controls of the panel. |
The following code example shows how to use this method. GcZoom use Controls property to get the all child controls, But GcZoomPanel should use InnerControls to get.
This code example is part of a larger example provided for the Controls property.
public class GcZoomControlsDemo : Form
{
private GcZoom _gcZoom1 = new GcZoom();
private Button _controlsButton;
public GcZoomControlsDemo()
{
InitializeComponent();
_gcZoom1.Target = this;
_controlsButton.Click += _controlsButton_Click;
}
void _controlsButton_Click(object sender, EventArgs e)
{
foreach (Control item in _gcZoom1.Controls)
{
Console.WriteLine(item.ToString());
}
}
private void InitializeComponent()
{
_controlsButton = new Button();
_controlsButton.Text = "Controls";
_controlsButton.Location = new Point(20, 130);
_controlsButton.Size = new Size(120, 25);
this.Controls.Add(_controlsButton);
}
}
Public Class GcZoomControlsDemo
Inherits Form
Private _gcZoom1 As New GcZoom()
Private _controlsButton As Button
Public Sub New()
InitializeComponent()
_gcZoom1.Target = Me
AddHandler _controlsButton.Click, AddressOf _controlsButton_Click
End Sub
Private Sub _controlsButton_Click(sender As Object, e As EventArgs)
For Each item As Control In _gcZoom1.Controls
Console.WriteLine(item.ToString())
Next
End Sub
Private Sub InitializeComponent()
_controlsButton = New Button()
_controlsButton.Text = "Controls"
_controlsButton.Location = New Point(20, 130)
_controlsButton.Size = New Size(120, 25)
Me.Controls.Add(_controlsButton)
End Sub
End Class