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. Image for the cookie policy date
close icon

BarManager SelectedItemChanged Event is never emitted (

Hi there ! The implementation of BarItem.OnSelected never sets the SelectedItem property if the Selected event of the BarItem is null. So, the mechanism of displaying Tooltips via the BarManager event does not work unless every BarItem has a Selected event assign to it. And, on my opinion, every BarItem should fire the selected event via the BarManager even if it is disabled. Because a disabled BarItem should display a hint as well. BarItems.cs protected virtual void OnSelected(EventArgs args) { if(this.Enabled && this.Selected != null) { if(this.Manager != null) this.Manager.SelectedItem = this; this.Selected(this, args); } } corrected version: protected virtual void OnSelected(EventArgs args) { if(this.Manager != null) this.Manager.SelectedItem = this; if(this.Enabled && this.Selected != null) { this.Selected(this, args); } }

1 Reply

AD Administrator Syncfusion Team February 21, 2005 03:07 PM UTC

Hi Ralf, The SelectedItemChanged event does not fire for disabled BarItems because disabled BarItems cannot be selected. If you mouse over a disabled menu item in VS .NET, IE, etc. you''ll notice that the item is not selected. XPMenus does support tooltips for disabled BarItems. Do you have a reason to not use the built-in tooltips? Regards, Gregory Austin Syncfusion Inc.

Live Chat Icon For mobile
Up arrow icon