Hello,
If know whether the content of a Label is text plain or formattedtext
You can use following code to check the content of Label is text plain or formattedtext.
For example, if the content of Label is text plain, you will get null value from label.FormattedText
and following method will return false. If the content of Label is formattedtext, the following method will return true value.
bool ContainsFormattedText(Label label) {
return label.FormattedText != null;
}
Best Regards, Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.