Gets or sets the label text.
Namespace: MindFusion.Reporting
Assembly: MindFusion.Reporting
C# Copy Code |
---|
public string Text { get; set; } |
Visual Basic Copy Code |
---|
Public Property Text As String |
A string representing the label's text.
This property is ignored if the label is data-bound, that is, its DataField property is not empty. The text of the label in this case is obtained from the data source.
The text of the label can contain expressions embedded in it. To embed an expression, simply encompass it in square brackets - '[' and ']'. The following example embeds the expression Now() in the text of a label. The example assumes that label1 is a variable identifying an existing label.
C# Copy Code |
---|
label1.Text = "The time now is [Now()]"; |
Visual Basic Copy Code |
---|
label1.Text = "The time now is [Now()]" |
For more information about expressions in general, check Expressions. For more information on how to use expressions in label texts, check Using Expressions in Reports.