Mouse events

3 posts, 0 answers
  1. Andrey
    Andrey avatar
    4 posts
    Member since:
    Nov 2007

    Posted 15 Dec 2011 Link to this post

    Hello
    How I can make proper work of events MouseEnter and MouseLeave? On entering mouse cursor in Item PanelBar these two events switching one after other. I detect in code
    Dim Panel As New RadPanelBarItem()
    Dim item As New TextBlock() Witch{.Text = "Bla-Bla-Bla"}
         AddHandler item.MouseEnter, AdressOf item_MouseEnter
         AddHandler item.MouseLeave, AdressOf item_MouseLeave
     Panel.Items.Add(item)
    but these events are raising continuously while mouse cursor is on Item object.
    What can I do? Thanks
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Dec 2011 Link to this post

    Hello Andrey,

     I prepared a sample project for you and a video showing how I test this scenario. Basically, when the TextBlock is Content of the RadPanelBarItem in XAML or it is added in a RadPanelBar's Items collection, it is automatically wrapped in RadPanelBarItem. I cannot see any unusual behavior of these two events as the video demonstrates. Please let us know if I have missed something.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Andrey
    Andrey avatar
    4 posts
    Member since:
    Nov 2007

    Posted 20 Dec 2011 Link to this post

    Thanks. I am a stupid man. I am using MessageBox in MouseEnter event and receive error while mouse stay on the object. Thanks for your answer.
Back to Top