Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Xamarin UITextView Binding in Code

$
0
0

We are developping a xamarin forms app in VS2019 where we require the rtf funcionality of the native UITextView. We implemented this with an interface and a platform implementation as shown below - which works fine. What we are missing is how to bind this view to the viewmodel - as the UI view is added to the view page in code. Would appreciate some advice.

UITextView textView = new UITextView {AllowsEditingTextAttributes = true};
var rtfstring = new NSAttributedString(rtfstring, new NSAttributedStringDocumentAttributes { DocumentType = NSDocumentType.RTF }, ref error);

textView.AttributedText = rtfstring;
stackLayout.Children.Add(textView);


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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