Hi all,
this question is fairly DevExpress-specific.
I use a NavBar control with the standard "SkinExplorerBarView" in a WinForms app, and would like to change the appearance of a selected navigation link.
I changed the background color of the control's "ItemPressed" and "ItemActive" appearances, as well as each single item's "Pressed" appearance, but none of these had the any effect on how the links look like when I click on them.
I also tried to set the control's LookAndFeel.UseDefaultLookAndFeel property to False, but that didn't help neither.
As proposed by Rusty, I then tried to implement the CustomDrawLink event, still without success. (Funnily, after having selected a link, it doesn't have the state "Selected" but "Pressed" instead, so I used that):
private void nbcNavigation_CustomDrawLink(object sender,
DevExpress.XtraNavBar.ViewInfo.CustomDrawNavBarElementEventArgs e)
{
if (e.ObjectInfo.State == DevExpress.Utils.Drawing.ObjectState.Pressed)
{
e.Appearance.BackColor = Color.FromArgb(192, 192, 255);
}
}
I found an example on using CustomDrawLink, but that does all the drawing by hand, which is much pain and overkill. I want the DevExpress "engine" to draw the link, just by using another BackColor.