Class Label
Displays a caption, required field indicator, and validation error indicator for a control.
Inherited Members
Namespace: System.Windows.Controls
Assembly: Controls.Data.Input.OpenSilver.dll
Syntax
public class Label : ContentControl
Constructors
| Improve this Doc View SourceLabel()
Initializes a new instance of the Label class.
Declaration
public Label()
Fields
| Improve this Doc View SourceIsRequiredProperty
Identifies the IsRequired dependency property.
Declaration
public static readonly DependencyProperty IsRequiredProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsValidProperty
Identifies the IsValid dependency property
Declaration
public static readonly DependencyProperty IsValidProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
PropertyPathProperty
Identifies the PropertyPath dependency property
Declaration
public static readonly DependencyProperty PropertyPathProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TargetProperty
Identifies the Target dependency property.
Declaration
public static readonly DependencyProperty TargetProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceIsRequired
Gets or sets a value that indicates whether the Target field is required.
Declaration
public bool IsRequired { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsValid
Gets a value that indicates whether the Target field data is valid.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PropertyPath
Gets or sets the path to the dependency property on the DataContext of the Target control that this Label is associated with.
Declaration
public string PropertyPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Target
Gets or sets the control that this Label is associated with.
Declaration
public FrameworkElement Target { get; set; }
Property Value
Type | Description |
---|---|
FrameworkElement |
Methods
| Improve this Doc View SourceOnApplyTemplate()
When the template is applied, this loads all the template parts
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnContentChanged(Object, Object)
Called when the value of the System.Windows.Controls.Label.Content property changes.
Declaration
protected override void OnContentChanged(object oldContent, object newContent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldContent | The old value of the System.Windows.Controls.Label.Content property. |
System.Object | newContent | The new value of the System.Windows.Controls.Label.Content property. |
Refresh()
Reload the metadata from the source target or DataContext
Declaration
public virtual void Refresh()