Continuation of http://ko.infragistics.com/community/forums/p/108997/513245.aspx :
How do I change the mouseover / HotTrack color of those items?
Thanks in advance
Hello,
Unlike the solution in the previous case, this cannot be done with a single property setting. UltraStatusPanels do not have hottracked appearance properties, nor does the UltraStatusPanel UI Role in AppStylist have a hot tracked state.
The best way to accomplish this is to add some code to change the normal appearance properties based on the MouseEnterElement/MouseLeaveElement events. First, you'll need to disable the UseOSThemes property:
ultraStatusBar1.UseOsThemes = DefaultableBoolean.False;
If UseOSThemes is set to true, Windows has control of the drawing and it doesn't care about the IG appearance settings.
Next, add some code to the aforementioned events:
private void ultraStatusBar1_MouseEnterElement(object sender, UIElementEventArgs e){ if (e.Element is Infragistics.Win.UltraWinStatusBar.PanelUIElement) { UltraStatusPanel panel = e.Element.GetContext(typeof(UltraStatusPanel)) as UltraStatusPanel; panel.Appearance.BackColor = Color.Red; }} private void ultraStatusBar1_MouseLeaveElement(object sender, UIElementEventArgs e){ if (e.Element is Infragistics.Win.UltraWinStatusBar.PanelUIElement) { UltraStatusPanel panel = e.Element.GetContext(typeof(UltraStatusPanel)) as UltraStatusPanel; panel.Appearance.BackColor = Color.Empty; }}
private void ultraStatusBar1_MouseLeaveElement(object sender, UIElementEventArgs e){ if (e.Element is Infragistics.Win.UltraWinStatusBar.PanelUIElement) { UltraStatusPanel panel = e.Element.GetContext(typeof(UltraStatusPanel)) as UltraStatusPanel; panel.Appearance.BackColor = Color.Empty; }}
Please try this out and let me know whether it works.