Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Input type as html not working if text set from viewmodel in xamarin forms

$
0
0

Label TextType="Html" Text="{Binding HtmlText}"/>

public class TestingPageViewModel : BaseViewModel
{
public TestingPageViewModel()
{

        var text = "<div class="condition-section">\n<h2>1. Support</h2>\n<p>Use this PIN to authorize your transactions on the\nregistered mobile & generate Smart Pass token for online banking and other devices.\n</p>\n<p>Use this PIN: Use this PIN to authorize your transactions on the registered mobile & generate Smart Pass token for online banking and other devices.Use this PIN to authorize your transactions on the registered mobile & generate Smart Pass token for online banking and other devices</p>\n<p>Use this PIN to authorize your transactions on the registered mobile & generate Smart Pass token for online banking and other devices.\nUse this PIN: Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit.\nUse this PIN to authorize your transactions on the registered mobile & generate Smart Pass token for online banking and other devices.</p>\n<p>Use this PIN to authorize your transactions on the registered mobile & generate Smart Pass token for online banking and other devices.</p>\n</div>";

         HtmlText = text;
    }

    private string _htmlText;


    public string HtmlText { get => _htmlText; set => SetProperty(ref _htmlText , value); }

}

}

Its display text same like "<div class="condition-section">\n<h2>1. Support</h2>\n<p>Use this PIN to authorize your transactions on the\nregistered mobile &amp; generate Smart Pass token for online banking and other devices.\n</p>\n<p>Use this PIN: Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices</p>\n<p>Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.\nUse this PIN: Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit.\nUse this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.</p>\n<p>Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.</p>\n</div>"

but when I set this text as

Label TextType="Html" Text="<div class="condition-section">\n<h2>1. Support</h2>\n<p>Use this PIN to authorize your transactions on the\nregistered mobile &amp; generate Smart Pass token for online banking and other devices.\n</p>\n<p>Use this PIN: Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices</p>\n<p>Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.\nUse this PIN: Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit.\nUse this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.</p>\n<p>Use this PIN to authorize your transactions on the registered mobile &amp; generate Smart Pass token for online banking and other devices.</p>\n</div>"/>


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>