Mix bold text to plain text in labels

前端 未结 3 639
太阳男子
太阳男子 2021-01-27 07:36

I save my text data in a sqlite database, I am able to store them, read them and etc.

To load it in The app I do something like this in

3条回答
  •  日久生厌
    2021-01-27 07:47

    I guess you cannot store a formatted text in your data base. There is no way for it to what I know. However, you can format your text for the label using the FormattedText property of the Label and setting FormattedString.

    Refer Xamarin documentation here for more details.

    Refer below example code.

    
    

    As of now the only way to store formatted text in your database would be to format it using HTML and save it. You can use the Display HTML feature of Label to render that in UI. Documentation details here.

    Refer below code more reference.

提交回复
热议问题