[]
Provides generic operations that return the concrete form control type.
This interface extends IControl with typed members for duplicating a form control or relocating it by copy or cut operations. The generic type parameter preserves the specific control interface in the returned value.
public interface IControl<T> : IControl where T : IControl<T>
Public Interface IControl(Of T As IControl(Of T))
Inherits IControl
| Name | Description |
|---|---|
| T |
IButton button = worksheet.Controls.AddButton(20, 20, 100, 24);
IControl<IButton> control = button;
IButton copiedButton = control.Copy(140, 20);
IButton movedButton = control.Cut(20, 60);
IButton duplicatedButton = control.Duplicate();
| Name | Description |
|---|---|
| Copy(double, double) | Copy this control to the destination position. Creates a new control at the specified left and top position and returns the copied control as the same concrete control type. |
| Cut(double, double) | Cut this control and paste to the destination position. Moves the current control to the specified left and top position and returns the same control as the concrete control type. |
| Duplicate() | Copies this control to the default destination position. Creates a new control of the same type as this control and returns a reference to the copied control. |