Forum Xamarin.Mac


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

RichTextView with NSTextView problem


I need to use a Rich NSTextView to view an RTF file.

I can correctly display the RTF file and I have the bar to change font, size, fat, etc ...

Only, I do not know why, when I want to change the size of the font or the color of the text, it does not work. The rest is working properly.

Can someone help me and tell me why?

Thank you


  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    I was unable to reproduce this issue. I made a simple test app that just had an NSTextView in the main view that loads an rtf file from Resources folder in the ViewDidLoad method. Without any other changes, I am able to select some text and change the text color and font size.

    Are you adding the NSTextView to your layout in code or are you using the interface builder? I used the interface builder, so many some default settings are put in place that are not when you create the NSTextView in code?

  • RogisterAlainRogisterAlain BEBeta ✭✭✭


    I used Interface Builder. I did like you.

    I have in a window a webview and a RichTextView. In function, if it's an HTML or an RTF file, I hide one or the other. But during my tests, when I hid the webview and I posted the RTF file. Everything works, but it's impossible to change the color, the font size and the underline. For the rest everything worked.

    I will redo a simple application like you and I'll let you know.

    thanks for the help

  • RogisterAlainRogisterAlain BEBeta ✭✭✭

    I tried what you did. A simple application and control works well.

    Only me, in my application, I open another window that contains this control and here I have this problem.

    Do you have a solution ?

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    Not without seeing more source code. Is it possible for you to provide a stripped down version of your app that only has the minimum code necessary to reproduce the issue? There is no way to tell if this is a bug in Xamarin.Mac SDK, in your implementation, or in Cocoa without seeing exactly what you are doing code wise when the issue occurs.

    It may be best to work one on one with a support engineer thus code and data can be exchanged privately and securely in accordance with GDPR. You can open a free Xamarin support case here:

  • RogisterAlainRogisterAlain BEBeta ✭✭✭

    I sent the problem to support. It is simple enough to reproduce. When in an application, you open a modal window that contains a RichTextView, the font size, color, and highlighting functions do not work. If the window is not modal, it works.

    I made a small application to reproduce the problem that I sent to the support Thursday but I wait response.


Sign In or Register to comment.