How to disable RibbonBar flashing on MouseEnter/Exit

8 posts, 1 answers
  1. Michelle
    Michelle avatar
    13 posts
    Member since:
    Nov 2010

    Posted 15 Nov 2010 Link to this post

    I notice this happening after upgrading to SP3 -- when the mouse enters or exits the ribbon bar, or the form's titlebar, the ribbonbar flashes momentarily. I don't know if this is intentionally added or not, but I find it distracting. The subtle highlighting when the mouse enters a new chunk is sufficient.

    Is there a way to turn this off?

    Thanks,

    Michelle
  2. Michelle
    Michelle avatar
    13 posts
    Member since:
    Nov 2010

    Posted 15 Nov 2010 Link to this post

    It doesn't flash when the Office2007Silver or Office2007Black themes are applied, but does when ControlDefault theme is reapplied. So it must be a newly added animation in the theme. I don't think it looks good as default -- the yellowish flashes seriously remind me of a summer lightning storm on the horizon.

    Now I know where to look for it...
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 16 Nov 2010 Link to this post

    Hello,

    I have to agree with Michelle.

    I find it very distracting.

    The badest thing is that it is in the default theme.

    Regards,

    Ramius

  5. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    Hi All,

    This should stop the flashing.

    Private m_Fill As Telerik.WinControls.Primitives.FillPrimitive
    Private Sub FillPropertyChanging(ByVal sender As Object, ByVal e As RadPropertyChangingEventArgs)
        e.Cancel = True
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        m_Fill = DirectCast(Me.RadRibbonBar1.RootElement.Children(0).Children(2).Children(1).Children(0).Children(1), Telerik.WinControls.Primitives.FillPrimitive)
        AddHandler m_Fill.RadPropertyChanging, AddressOf FillPropertyChanging
    End Sub

    Please let me know if this helps or if you need further help

    Richard
  6. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 17 Nov 2010 Link to this post

    Hi Richard,

    Thank you for your help.
    Your code stops the flashing.

    Regards,

    Ramius
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Nov 2010 Link to this post

    Hello Ramius,

    I'm glad you found that useful.

    Michelle, if this also works for you, may I ask that you mark as answer so others can find the solution too.

    All the best
    Richard
  8. Michelle
    Michelle avatar
    13 posts
    Member since:
    Nov 2010

    Posted 18 Nov 2010 Link to this post

    Yes, it does. Thanks for looking into this. I intend to subclass the theme in the future as there are other aspects of the ControlDefault theme that I prefer from SP2.

    Here's the code in C#, condensed somewhat:

    private void DisableRibbonBarFlashingInSP3()
    {
        radRibbonBar1.RootElement.Children[0].Children[2].Children[1].Children[0].Children[1].RadPropertyChanging += FillPropertyChanging;
    }
     
    private static void FillPropertyChanging(object sender, RadPropertyChangingEventArgs args)
    {
        args.Cancel = true;
    }
  9. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 19 Nov 2010 Link to this post

    Hello Michelle,

    We will address this issue in our upcoming service pack. We will include also a fix in the internal build which will be available next week.

    Don't hesitate to contact us if you have other questions.

    Best wishes, Peter
    the Telerik team
    Get started with RadControls for WinForms. Watch the numerous videos.
Back to Top
UI for WinForms is Visual Studio 2017 Ready