How to highlight text when click label in xamarin forms?

  Uncategorised

How to highlight text when click label get the index position and highlight One Sentence in xamarin forms.

This is my layout looks llike

 <StackLayout>
                    <Label Text="{Binding Loremipsum.Content}"
                           x:Name="LoremipsumText"
                           FontSize="18"
                           FontFamily="Font4"
                           TextTransform="None"
                           TextColor="White">
                        <Label.GestureRecognizers>
                            <TapGestureRecognizer Tapped="btnHighLight"></TapGestureRecognizer>
                        </Label.GestureRecognizers>
                    </Label>
                </StackLayout>

See this picture for reference

if the image is not load
this is the text example

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

iwant to hilght is this text

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Source: Visual Studio Questions

LEAVE A COMMENT