dotnetheavenChnage background of seperator menu c#.net ,WPF

Mar 6 2009 12:29 AM
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