[FIXED] How I will get line in string array that start with # tag and will show as a heading. Using Xamarin C#

Issue

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#.

Thank you!

Solution

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.

Answered By – Adrain

Answer Checked By – Marilyn (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published