0
Answer

dotnetheavenChnage background of seperator menu c#.net ,WPF

sushma sushma

sushma sushma

15y
3.1k
1
Hi,
    I want to know how to change background of seperator menu dynamically in c# .net WPF applicaiton.

I am using following code but its not changing the background of seperator menu item.

ContextMenu dtmContextMenu = new ContextMenu();
Separator menuItemSeperator new Separator();
 menuItemSeperator.Background = new SolidColorBrush(System.Windows.Media.Color.FromRgb(211, 211, 211));
dtmContextMenu.Items.Add(menuItemSeperator);

Can anyone help me out please

Regards,
sushma