[]
Gets the collection of controls that can receive the zoom gesture message.
[Browsable(false)]
public List<Control> ZoomTargets { get; }
Type | Description |
---|---|
List<Control> | An collection of controls that can receive the zoom gesture message. |
The C1Zoom will do nothing while the user do zoom gesture at the controls on the collection.
The following code example shows how use this property.
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 _zoomTargetsButton;
public GcZoomControlsDemo()
{
InitializeComponent();
_gcZoom1.Target = this;
_zoomTargetsButton.Click += _zoomTargetsButton_Click;
}
void _zoomTargetsButton_Click(object sender, EventArgs e)
{
foreach (Control item in _gcZoom1.ZoomTargets)
{
Console.WriteLine(item.ToString());
}
}
private void InitializeComponent()
{
_zoomTargetsButton = new Button();
_zoomTargetsButton.Text = "ZoomTargets";
_zoomTargetsButton.Location = new Point(20, 220);
_zoomTargetsButton.Size = new Size(120, 25);
this.Controls.Add(_zoomTargetsButton);
}
}
Public Class GcZoomControlsDemo
Inherits Form
Private _gcZoom1 As New GcZoom()
Private _zoomTargetsButton As Button
Public Sub New()
InitializeComponent()
_gcZoom1.Target = Me
AddHandler _zoomTargetsButton.Click, AddressOf _zoomTargetsButton_Click
End Sub
Private Sub _zoomTargetsButton_Click(sender As Object, e As EventArgs)
For Each item As Control In _gcZoom1.ZoomTargets
Console.WriteLine(item.ToString())
Next
End Sub
Private Sub InitializeComponent()
_zoomTargetsButton = New Button()
_zoomTargetsButton.Text = "ZoomTargets"
_zoomTargetsButton.Location = New Point(20, 220)
_zoomTargetsButton.Size = New Size(120, 25)
Me.Controls.Add(_zoomTargetsButton)
End Sub
End Class