System.Windows.Forms
1.0.5000.0
2.0.0.0
System.Windows.Forms.Control
System.ComponentModel.DefaultBindingProperty("Text")
System.ComponentModel.ToolboxItem("System.Windows.Forms.Design.AutoSizeToolboxItem,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.Runtime.InteropServices.ComVisible(true)
System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)
System.ComponentModel.Designer("System.Windows.Forms.Design.LabelDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.ComponentModel.DefaultProperty("Text")
controls are typically used to provide descriptive text for a control. For example, you can use a to add descriptive text for a control to inform the user about the type of data expected in the control. controls can also be used to add descriptive text to a to provide the user with helpful information. For example, you can add a to the top of a that provides instructions to the user on how to input data in the controls on the form. controls can be also used to display run time information on the status of an application. For example, you can add a control to a form to display the status of each file as a list of files is processed.
A participates in the tab order of a form, but does not receive focus (the next control in the tab order receives focus). For example, if the property is set to true, and a mnemonic character—the first character after an ampersand (&)—is specified in the property of the control, when a user presses ALT+ the mnemonic key, focus moves to the next control in the tab order. This feature provides keyboard navigation for a form. In addition to displaying text, the control can also display an image using the property, or a combination of the and properties.
A can be made transparent by setting its property to Color.Transparent. When you use a transparent label, use only the current device coordinate system to draw on the container, or the background might paint improperly.
Represents a standard Windows label.
Constructor
By default, a label is displayed with its property set to false and with its property set to BorderStyle.None.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.ComponentModel.DefaultValue(false)
System.Boolean
To be added.
Set to true to display text that extends beyond the width of the when the user passes over the control with the mouse. If is true, the label will grow to fit the text and an ellipsis will not appear.
If the font is taller than the height of the and is true, you must set to false for text to be drawn.
Gets or sets a value indicating whether the ellipsis character (...) appears at the right edge of the , denoting that the text extends beyond the specified length of the .
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(false)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)
System.ComponentModel.Browsable(true)
System.Boolean
To be added.
When this property is set to true, the adjusts its width to display its entire contents. This property is typically set to true when you use a control to display various lengths of text, such as the status of an application process. You can also use this property when the application will display text in various languages, and the size of the text might increase or decrease based on the language settings in Windows.
If the font is taller than the height of the and is true, you must set to false for text to be drawn.
Gets or sets a value indicating whether the control is automatically resized to display its entire contents.
1.0.5000.0
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property changes.
1.0.5000.0
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Drawing.Image
To be added.
This property is not relevant for this class.
Gets or sets the image rendered on the background of the control.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant for this class.
Occurs when the property changes.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ImageLayout
To be added.
This property is not relevant for this class.
This property is not relevant for this class.
Event
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant for this class.
Occurs when the property changes.
Property
System.Runtime.InteropServices.DispId(-504)
System.ComponentModel.DefaultValue(System.Windows.Forms.BorderStyle.None)
System.Windows.Forms.BorderStyle
To be added.
You can use this property to add a border to the control. This property is typically used to differentiate a that labels another control from a that displays the status of a process in an application.
Gets or sets the border style for the control.
1.0.5000.0
2.0.0.0
Method
System.Drawing.Rectangle
You can use this method within a derived class of , to determine the size and location of an image to draw within the control based on its location within the control. The location of the image is based on the value of the control's property.
Determines the size and location of an image drawn within the control based on the alignment of the control.
A that represents the size and location of the specified image within the control.
The used to determine size and location when drawn within the control.
A that represents the area to draw the image in.
The alignment of content within the control.
1.0.5000.0
2.0.0.0
Method
System.Windows.Forms.AccessibleObject
To be added.
Creates a new accessibility object for the control.
A new for the control.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.CreateParams
To be added.
To be added.
Gets the required creation parameters when the control handle is created.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.ImeMode
To be added.
To be added.
Gets the default Input Method Editor (IME) mode supported by this control.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.Windows.Forms.Padding
To be added.
To be added.
Gets the space, in pixels, that is specified by default between controls.
Property
System.Drawing.Size
To be added.
To be added.
Gets the default size of the control.
1.0.5000.0
2.0.0.0
Method
System.Void
This method is called by the public Dispose method and the method. Dispose invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.
When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose method of each referenced object.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Draws an within the specified bounds.
The surface on which to draw.
The to draw.
The bounds to draw within.
The alignment of the image to draw within the .
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DefaultValue(System.Windows.Forms.FlatStyle.Standard)
System.Windows.Forms.FlatStyle
To be added.
When the property is set to FlatStyle.System, any values assigned to the , , , and properties are ignored. In addition, the property ignores any property values that are not vertical property settings. Horizontally aligned settings of the property are aligned to the top of the control. For example, if you set the property to ContentAlignment.TopCenter, ContentAlignment.MiddleCenter, or ContentAlignment.BottomCenter, when the property is set to FlatStyle.System, the text in the control will be aligned to the top and center locations within the bounds of the control.
In the .NET Framework version 1.1, setting the property to FlatStyle.System does not cause the value of the property to be ignored. In addition, the property has no effect in the derived class, .
Gets or sets the flat style appearance of the label control.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Drawing.Size
To be added.
Retrieves the size of a rectangular area into which a control can be fitted.
An ordered pair of type representing the width and height of a rectangle.
The custom-sized area for a control.
Property
System.ComponentModel.Localizable(true)
System.Drawing.Image
To be added.
The property cannot be used at the same time as the and properties. When the property is used to display an image, the and properties are automatically set to their default settings.
Gets or sets the image that is displayed on a .
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Drawing.ContentAlignment.MiddleCenter)
System.Drawing.ContentAlignment
To be added.
This property enables you to align an image within the boundaries of the control to ensure that the image is properly displayed. You can add an image to a using the property or the and properties. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image.
Gets or sets the alignment of an image that is displayed in the control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageIndexConverter))
System.ComponentModel.Localizable(true)
System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue(-1)
System.Int32
To be added.
The and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is automatically set to null.
Gets or sets the index value of the image displayed on the .
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.ComponentModel.Localizable(true)
System.String
To be added.
The property specifies the image from the image list to display on the .
Gets or sets the key accessor for the image in the .
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.DefaultValue(null)
System.Windows.Forms.ImageList
To be added.
The and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is set to null.
The will not be garbage collected if its is still referenced elsewhere. Set the property of the to null to enable efficient garbage collection.
Gets or sets the that contains the images to display in the control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ImeMode
To be added.
This property is not relevant for this class.
Gets or sets the Input Method Editor (IME) mode supported by this control.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant for this class.
Occurs when the property changes.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.KeyEventHandler
This event is not relevant for this class.
Occurs when the user presses a key while the label has focus.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.KeyPressEventHandler
This event is not relevant for this class.
Occurs when the user presses a key while the label has focus.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.KeyEventHandler
This event is not relevant for this class.
Occurs when the user releases a key while the label has focus.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
2.0.0.0
Method
2.0.0.0
System.Void
To be added.
Raises the event.
A that contains the event data.
Method
System.Void
To be added.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
This property returns the height that the control should be in order to properly display text, based on the font assigned to the control. You can use this property along with the property to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control, based on the text and font size.
If the property of the control is set to BorderStyle.None, the value returned by property will be larger due to the lack of borders.
Gets the preferred height of the control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
This property returns the length of the text string, but does not take line wrapping into consideration. For example, a text string that measures 300 pixels wide could be displayed as three lines in a that is only 100 pixels wide. The property still returns 300 pixels. You can use this property, along with the property, to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control based on the text and font size.
If the property of the control is set to BorderStyle.None, the value returned by property will be larger due to the lack of borders.
Gets the preferred width of the control.
1.0.5000.0
2.0.0.0
Method
System.Boolean
To be added.
Processes a mnemonic character.
true if the character was processed as a mnemonic by the control; otherwise, false.
The character to process.
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
Classes that inherit from Label can override this method to determine whether the derived control background will be rendered transparently on the form on which the control is drawn.
Indicates whether the container control background is rendered on the .
1.0.5000.0
2.0.0.0
System.Obsolete("This property has been deprecated. Use BackColor instead.")
Method
System.Void
If you set the property to true, the label will be sized to fit the contents of the label. If you set to false after calling the method, the label will receive the dimensions you specified in the call.
Sets the specified bounds of the label.
The new property value of the control.
The new property value of the control.
The new property value of the control.
The new property value of the control.
A bitwise combination of the values. For any parameter not specified, the current value will be used.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DefaultValue(false)
System.ComponentModel.Browsable(false)
System.Boolean
To be added.
The property is not relevant for the class, so setting to true has no effect.
Gets or sets a value indicating whether the user can tab to the . This property is not used by this class.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
This event is not relevant for this class.
Occurs when the property changes.
1.0.5000.0
2.0.0.0
Property
System.String
To be added.
To be added.
Gets or sets the text associated with this control.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.SettingsBindable(true)
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Drawing.ContentAlignment.TopLeft)
System.Drawing.ContentAlignment
To be added.
You can use this property to align the text within a label to match the layout of controls on your form. For example, if your controls are located to the right edge of the labels, you can set the property to one of the right-aligned horizontal alignments (, , ) and the text will be aligned with the right edge of the labels to align with your controls.
Gets or sets the alignment of text in the label.
1.0.5000.0
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property has changed.
1.0.5000.0
2.0.0.0
Method
System.String
To be added.
Returns a string that represents the current .
A string that represents the current .
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
The UseCompatibleTextRendering property is intended to provide visual compatibility between Windows Forms controls that render text using the class and net_v10_short and net_v11_short applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from net_v10_short or net_v11_short, it is recommended that you leave UseCompatibleTextRendering set to the default value of false.
The ndptecgdi based class was introduced in the dnprdnlong to improve performance, make text look better, and improve support for international fonts. In earlier versions of the dnprdnshort, the ndptecgdiplus based class was used to perform all text rendering. ndptecgdi calculates character spacing and word wrapping differently from ndptecgdiplus. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the UseCompatibleTextRendering property to true for a specific control. To set UseCompatibleTextRendering to true for all supported controls in the application, call the method with a parameter of true.
Gets or sets a value that determines whether to use the class (ndptecgdiplus) or the class (ndptecgdi) to render text.
2.0.0.0
System.ComponentModel.DefaultValue(false)
Property
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
If the property is set to true and a mnemonic character (a character preceded by the ampersand) is defined in the property of the , pressing ALT+ the mnemonic character sets the focus to the control that follows the in the tab order. You can use this property to provide proper keyboard navigation to the controls on your form.
Gets or sets a value indicating whether the control interprets an ampersand character (&) in the control's property to be an access key prefix character.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0