I update my question.
How I will get line that start with # tag and will show as a heading. Before next # tag all data will be show as content of the heading.
Now I have getting file data in label. How I will do work with this. Using Xamarin C#.
This is data in simple text file.
#Terms of Service
These Terms of Use (hereinafter referred to as "Terms") are the services provided by xyz on this website (hereinafter referred to as "Services").Establishes the terms of use.
#Article 1 (Applicable)
This agreement shall apply to all relationships related to the use of this service between the user and our company.
#Article 2 (Registration)
- The registration applicant shall apply for the usage registration by the method specified by the Company, and the usage registration shall be completed when the Company approves it.
#xyz abcd heading type like this
content type data like this.
Thank you!
CodePudding user response:
To have different text Type in label, you can try spantext, code like:
<Label FontSize="16" >
<Label.FormattedText>
<FormattedString>
<FormattedString.Spans>
<Span Text="Hello " x:Name="text1"/>
<Span Text="World " FontAttributes="Bold" x:Name="text2"/>
</FormattedString.Spans>
</FormattedString>
</Label.FormattedText>
</Label>
As for how to change the specific sentence, you can get the span text in code behind, and handle it there on Onappearing method.