We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Font color of context menu

Hi,
I want to have the color white of my text menu when the item is selected. Actually, the color is black.
How is it possible?
Thanks
Lionel


3 Replies

AD Administrator Syncfusion Team November 25, 2008 12:40 PM UTC

I am not sure I understand the question. Do you want to change the color on the WPF default context menu for a textbox? (the Copy, Paste,... menu)



LT Lionel Thiebaut November 25, 2008 12:46 PM UTC

In a context menu, the items have background = white and textcolor = black.

When, with the mouse, I select an item : his line have background = blue and textcolor = black.
I'd like to know if in the last case, I can change textcolor to put it in white.




AD Administrator Syncfusion Team November 25, 2008 01:20 PM UTC

The ContextMenu is a WPF object and not part of the Syncfusion library. So, there is no property within the Syncfusion library that would control this behavior.

Just looking at the behavior of the ContextMenu, I think it would be very difficult to change this text color under the selection. It is simple to change the background and foreground of the entire control using :

menu.Background = Brushes.Red;
menu.Foreground = Brushes.White;

but I think what is happening when you see the blue selection is that a separate frame using an alphablended color is being drawn over the selection. This means the black text you are seeing under the blue frame is the original text just bleeding through the selection frame. If this is how things are working, I am not sure how to change just the font color of the text under the selection frame.


Loader.
Live Chat Icon For mobile
Up arrow icon