Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
[BUG] RibbonTool stays highlighted when it's disabled
posted

A tool appear to become "stuck" in highlighted mode if you disable it while having the mouse pointer on it. The following is what happens (using version 10.1):

1. Poisition the mouse pointer on a tool -> it becomes highlighted with a yellow color
2. Click the button and disable it from the click event handler -> tool is still highlighted
3. Move the mouse pointer away from the (still disabled) tool -> tool is still highlighted
4. Enabled the button again (somehow) -> tool is still highlighted

Since the tool is disabled it never gets the MouseLeave message so it can cancel the MouseOver visual state. I belive the correct action is to cancel the MouseOver state when the tool gets disabled (I looked into how Microsoft is solving this problem in their own controls and that's what they do).

Here is some very simple code that reproducs the behaviour. Simply paste it in a new Silverlight project (you need to add a reference to System.Windows.Controls as well).

XAML:

<ig:XamWebRibbon>
  <ig:XamWebRibbon.Tabs>
    <ig:XamWebRibbonTabItem Header="TestTabItem">
      <ig:XamWebRibbonGroup Caption="TestGroup">
        <ig:ButtonTool Caption="Test" Click="ButtonTool_Click"/>
      </ig:XamWebRibbonGroup>
    </ig:XamWebRibbonTabItem>
  </ig:XamWebRibbon.Tabs>
</ig:XamWebRibbon>

Code behind:

private void ButtonTool_Click(object sender, RibbonToolEventArgs e)
{
  ChildWindow wnd = new ChildWindow();
  wnd.Show();
}

When running it, simply click the ribbon button. You'll notice the button is still highlighted when the dialog is showing. Then go close the dialog and see that the button is still highlighted even though the mouse is no longer on it.

 

Parents
No Data
Reply Children
No Data