The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP]Unable to Change Textbox "SelectionHighlightColor" color RRS feed

  • Question

  • I am Unable to change SelectionHighlightColor ... i set this red but its shows green system color only

    its is possible or always work with system color?

    <TextBox x:Uid="LoginID"
                             PlaceholderText="Login ID"
                             Width="400"
                             Height="45"
                             BorderThickness="1"
                             BorderBrush="Red"
                             Windows10version1809:CornerRadius="2" 
                             Padding="10,12,0,0" SelectionHighlightColor="Red" PointerEntered="TextBox_PointerEntered">
                    </TextBox>


    Thursday, April 11, 2019 1:01 PM

All replies

  • Hi,

    In my test, you code works correctly. When I select the text, it shows in red color. I have some questions about this. I noticed that you had defined a x:Uid for your TextBox, have you defined the SelectionHighlightColor in the resource file? Or you that are another global style for the TextBox in your project and it covers the local style?

    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, April 22, 2019 8:46 AM
    Moderator