none
[XAML][C#] [UWP] How to to get transparency in a highlight color on rich edit box? RRS feed

  • Question

  • Hey there!

    So for my question today I have a Rich Edit Box which will highlight text a user wants highlighted. All that is working great but I cant get the highlight color to show what it actually should be. It seems as is the Alpha Channel is being ignored. How can I overcome this? Example code is below.

                                RichEditBox.Document.Selection.CharacterFormat.BackgroundColor = Color.FromArgb(100, 0, 179, 253);
    

    The code above should give a light blue but it displays the color with no transparency instead like below.

                                RichEditBox.Document.Selection.CharacterFormat.BackgroundColor = Color.FromArgb(255, 0, 179, 253);
    

    Is it not possible to get any transparency with the highlight color of a rich edit box? Many of the colors are too dark and the text is hard to read as a result.

    Thank you!

    Saturday, September 21, 2019 6:08 AM

All replies

  • Hi,

    I could reproduce this in my side. The same ARGB color works correctly when added to SolidColorBrush and apply to Button's background. I'll ask another engineer to check this. 

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 23, 2019 2:57 AM
    Moderator
  • Awesome thank you for looking into this!
    Saturday, September 28, 2019 6:10 PM
  • Hi,

    I've report this via our internal channel and I'm waiting for response now. Not sure when it will come. There might be some  time delay.

    Thank you for your patience in advance.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 30, 2019 9:19 AM
    Moderator