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.
Unfortunately, activation email could not send to your email. Please try again.

Font color of context menu

Thread ID:

Created:

Updated:

Platform:

Replies:

78007 Nov 25,2008 06:24 AM Nov 25,2008 08:20 AM WPF 3
loading
Tags: GridControl
Lionel Thiebaut
Asked On November 25, 2008 06:24 AM

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


Administrator [Syncfusion]
Replied On November 25, 2008 07:40 AM

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)


Lionel Thiebaut
Replied On November 25, 2008 07:46 AM

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.



Administrator [Syncfusion]
Replied On November 25, 2008 08:20 AM

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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;