|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
ToolStripControlHost (Clase)
Espacio de nombres: System.Windows.Forms
Ensamblado: System.Windows.Forms (en System.Windows.Forms.dll)
El tipo ToolStripControlHost expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | ToolStripControlHost(Control) | |
![]() | ToolStripControlHost(Control, String) |
| Nombre | Descripción | |
|---|---|---|
![]() | AccessibilityObject | |
![]() | AccessibleDefaultActionDescription | |
![]() | AccessibleDescription | |
![]() | AccessibleName | |
![]() | AccessibleRole | |
![]() | Alignment | |
![]() | AllowDrop | |
![]() | Anchor | |
![]() | AutoSize | |
![]() | AutoToolTip | |
![]() | Available | |
![]() | BackColor | |
![]() | BackgroundImage | |
![]() | BackgroundImageLayout | |
![]() | Bounds | |
![]() | CanRaiseEvents | |
![]() | CanSelect | |
![]() | CausesValidation | |
![]() | Container | |
![]() | ContentRectangle | |
![]() | Control | |
![]() | ControlAlign | |
![]() | DefaultAutoToolTip | |
![]() | DefaultDisplayStyle | |
![]() | DefaultMargin | |
![]() | DefaultPadding | |
![]() | DefaultSize | |
![]() | DesignMode | |
![]() | DismissWhenClicked | |
![]() | DisplayStyle | Infraestructura. |
![]() | Dock | |
![]() | DoubleClickEnabled | Infraestructura. |
![]() | Enabled | |
![]() | Events | |
![]() | Focused | |
![]() | Font | |
![]() | ForeColor | |
![]() | Height | |
![]() | Image | Infraestructura. |
![]() | ImageAlign | Infraestructura. |
![]() | ImageIndex | |
![]() | ImageKey | |
![]() | ImageScaling | Infraestructura. |
![]() | ImageTransparentColor | |
![]() | IsDisposed | |
![]() | IsOnDropDown | |
![]() | IsOnOverflow | |
![]() | Margin | |
![]() | MergeAction | |
![]() | MergeIndex | |
![]() | Name | |
![]() | Overflow | |
![]() | Owner | |
![]() | OwnerItem | |
![]() | Padding | |
![]() | Parent | |
![]() | Placement | |
![]() | Pressed | |
![]() | RightToLeft | |
![]() | RightToLeftAutoMirrorImage | Infraestructura. |
![]() | Selected | |
![]() | ShowKeyboardCues | |
![]() | Site | |
![]() | Size | |
![]() | Tag | |
![]() | Text | |
![]() | TextAlign | Infraestructura. |
![]() | TextDirection | Infraestructura. |
![]() | TextImageRelation | Infraestructura. |
![]() | ToolTipText | |
![]() | Visible | |
![]() | Width |
| Nombre | Descripción | |
|---|---|---|
![]() | CreateAccessibilityInstance | |
![]() | CreateObjRef | |
![]() | Dispose() | |
![]() | Dispose(Boolean) | |
![]() | DoDragDrop | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | Focus | |
![]() | GetCurrentParent | |
![]() | GetHashCode | |
![]() | GetLifetimeService | |
![]() | GetPreferredSize | |
![]() | GetService | |
![]() | GetType | |
![]() | InitializeLifetimeService | |
![]() | Invalidate() | |
![]() | Invalidate(Rectangle) | |
![]() | IsInputChar | |
![]() | IsInputKey | |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | |
![]() | OnAvailableChanged | |
![]() | OnBackColorChanged | |
![]() | OnBoundsChanged | |
![]() | OnClick | |
![]() | OnDisplayStyleChanged | |
![]() | OnDoubleClick | |
![]() | OnDragDrop | |
![]() | OnDragEnter | |
![]() | OnDragLeave | |
![]() | OnDragOver | |
![]() | OnEnabledChanged | |
![]() | OnEnter | |
![]() | OnFontChanged | |
![]() | OnForeColorChanged | |
![]() | OnGiveFeedback | |
![]() | OnGotFocus | |
![]() | OnHostedControlResize | |
![]() | OnKeyDown | |
![]() | OnKeyPress | |
![]() | OnKeyUp | |
![]() | OnLayout | |
![]() | OnLeave | |
![]() | OnLocationChanged | |
![]() | OnLostFocus | |
![]() | OnMouseDown | |
![]() | OnMouseEnter | |
![]() | OnMouseHover | |
![]() | OnMouseLeave | |
![]() | OnMouseMove | |
![]() | OnMouseUp | |
![]() | OnOwnerChanged | |
![]() | OnOwnerFontChanged | |
![]() | OnPaint | |
![]() | OnParentBackColorChanged | |
![]() | OnParentChanged | |
![]() | OnParentEnabledChanged | |
![]() | OnParentForeColorChanged | |
![]() | OnParentRightToLeftChanged | |
![]() | OnQueryContinueDrag | |
![]() | OnRightToLeftChanged | |
![]() | OnSubscribeControlEvents | |
![]() | OnTextChanged | |
![]() | OnUnsubscribeControlEvents | |
![]() | OnValidated | |
![]() | OnValidating | |
![]() | OnVisibleChanged | |
![]() | PerformClick | |
![]() | ProcessCmdKey | |
![]() | ProcessDialogKey | |
![]() | ProcessMnemonic | |
![]() | ResetBackColor | Infraestructura. |
![]() | ResetDisplayStyle | Infraestructura. |
![]() | ResetFont | Infraestructura. |
![]() | ResetForeColor | Infraestructura. |
![]() | ResetImage | Infraestructura. |
![]() | ResetMargin | Infraestructura. |
![]() | ResetPadding | Infraestructura. |
![]() | ResetRightToLeft | Infraestructura. |
![]() | ResetTextDirection | Infraestructura. |
![]() | Select | |
![]() | SetBounds | |
![]() | SetVisibleCore | |
![]() | ToString |
| Nombre | Descripción | |
|---|---|---|
![]() | AvailableChanged | |
![]() | BackColorChanged | |
![]() | Click | |
![]() | DisplayStyleChanged | Infraestructura. |
![]() | Disposed | |
![]() | DoubleClick | |
![]() | DragDrop | |
![]() | DragEnter | |
![]() | DragLeave | |
![]() | DragOver | |
![]() | EnabledChanged | |
![]() | Enter | |
![]() | ForeColorChanged | |
![]() | GiveFeedback | |
![]() | GotFocus | |
![]() | KeyDown | |
![]() | KeyPress | |
![]() | KeyUp | |
![]() | Leave | |
![]() | LocationChanged | |
![]() | LostFocus | |
![]() | MouseDown | |
![]() | MouseEnter | |
![]() | MouseHover | |
![]() | MouseLeave | |
![]() | MouseMove | |
![]() | MouseUp | |
![]() | OwnerChanged | |
![]() | Paint | |
![]() | QueryAccessibilityHelp | |
![]() | QueryContinueDrag | |
![]() | RightToLeftChanged | |
![]() | TextChanged | |
![]() | Validated | |
![]() | Validating | |
![]() | VisibleChanged |
| Nombre | Descripción | |
|---|---|---|
![]() ![]() | IDropTarget.OnDragDrop | |
![]() ![]() | IDropTarget.OnDragEnter | |
![]() ![]() | IDropTarget.OnDragLeave | |
![]() ![]() | IDropTarget.OnDragOver |
Construir un ToolStripControlHost con una clase que derive de Control. Para tener acceso total al control y las propiedades hospedados, debe volver a convertir la propiedad Control en la clase real que representa. Extender ToolStripControlHost y, en el constructor predeterminado de la clase heredada, llamar al constructor de clase base pasando una clase que derive de Control. Esta opción permite ajustar los métodos de control comunes y propiedades para obtener fácilmente acceso en un control ToolStrip.
//Declare a class that inherits from ToolStripControlHost. public class ToolStripMonthCalendar : ToolStripControlHost { // Call the base constructor passing in a MonthCalendar instance. public ToolStripMonthCalendar() : base (new MonthCalendar()) { } public MonthCalendar MonthCalendarControl { get { return Control as MonthCalendar; } } // Expose the MonthCalendar.FirstDayOfWeek as a property. public Day FirstDayOfWeek { get { return MonthCalendarControl.FirstDayOfWeek; } set { MonthCalendarControl.FirstDayOfWeek = value; } } // Expose the AddBoldedDate method. public void AddBoldedDate(DateTime dateToBold) { MonthCalendarControl.AddBoldedDate(dateToBold); } // Subscribe and unsubscribe the control events you wish to expose. protected override void OnSubscribeControlEvents(Control c) { // Call the base so the base events are connected. base.OnSubscribeControlEvents(c); // Cast the control to a MonthCalendar control. MonthCalendar monthCalendarControl = (MonthCalendar) c; // Add the event. monthCalendarControl.DateChanged += new DateRangeEventHandler(OnDateChanged); } protected override void OnUnsubscribeControlEvents(Control c) { // Call the base method so the basic events are unsubscribed. base.OnUnsubscribeControlEvents(c); // Cast the control to a MonthCalendar control. MonthCalendar monthCalendarControl = (MonthCalendar) c; // Remove the event. monthCalendarControl.DateChanged -= new DateRangeEventHandler(OnDateChanged); } // Declare the DateChanged event. public event DateRangeEventHandler DateChanged; // Raise the DateChanged event. private void OnDateChanged(object sender, DateRangeEventArgs e) { if (DateChanged != null) { DateChanged(this, e); } } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
