Forum Xamarin.iOS

Problems with utf8 in XAML page Xamarin iOS

matheuscrespimatheuscrespi Member ✭✭
edited January 6 in Xamarin.iOS

I have a XAML page in which I show the Terms of Use of the app and buttons to agree or disagree:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="Elysios.Demetra.App.Views.ContentPages.Account.TermsAndConditionsPage"
             BackgroundColor="#F2F2F2">
    <ContentPage.Content>
        <StackLayout x:Name="MainContent" Padding="0, 80, 0, 0">
            <Label Text="TERMOS DE USO" VerticalOptions="Start" HorizontalTextAlignment="Center" FontSize="Title"/>
            <StackLayout BackgroundColor="DimGray" VerticalOptions="FillAndExpand" Padding="0, 1, 0, 1">
                <ScrollView x:Name="TextScrollView" BackgroundColor="#FAFAFA" VerticalOptions="FillAndExpand">
                    <Label x:Name="MainText" TextType="Html" Padding="8"/>
                </ScrollView>
            </StackLayout>
            <StackLayout x:Name="ButtonLayout" HorizontalOptions="FillAndExpand" VerticalOptions="End" WidthRequest="200" Margin="12" Orientation="Horizontal">
                <Button x:Name="RefuseButton" 
                        Text="RECUSAR" 
                        BackgroundColor="LightGray" 
                        CornerRadius="10" 
                        TextColor="DimGray" 
                        HorizontalOptions="FillAndExpand"
                        Clicked="RefuseButton_Clicked"/>
                <Button x:Name="AcceptButton" 
                        Text="ACEITAR" 
                        BackgroundColor="ForestGreen" 
                        CornerRadius="10" 
                        TextColor="White" 
                        HorizontalOptions="FillAndExpand"
                        Clicked="AcceptButton_Clicked"/>
            </StackLayout>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

The property Name="MainText" is where I receive the terms of use in HTML from my web service
MainText.Text = await App.UserManager.RetrieveLastTerms().ConfigureAwait(true);

It seems to be right and this code is working fine in Xamarin Android, only in iOS is shown as in the image below:

Does anyone had this problem and knows how to resolve it? Or any other suggestion?

Tagged:
Sign In or Register to comment.