0

I am trying to build a text, that contains a .png inside. To be more clear I want something like this: "text text text image text text text"

I tried using StackLayout or Grid, but it does't help because the text is too long and it goes over more lines. This is the output I am trying to achieve:

output to achieve

Julian
  • 5,290
  • 1
  • 17
  • 40

1 Answers1

1

If the text is not dynamically changed, you could create the label line by line.

For example:

<StackLayout>
    <Label Text="already synchronized at the factory"/>
    <Label Text="which is confirmed by the fact that"/>
    <StackLayout Orientation="Horizontal">
        <Label Text="the icon"/>
        <Image Source="wifi.png" HeightRequest="10" WidthRequest="10"/>
        <Label Text="on the display does not"/>
    </StackLayout>
    <Label Text="blink. If it does, however, it means that"/>
    <Label Text="a new synchronization is required. To"/>
</StackLayout>

Make some slight changes to the margin, padding, height or width to make it look good.

Hope it helps.

Liqun Shen-MSFT
  • 3,490
  • 2
  • 3
  • 11