Infragistics Listbar: How to change item image on mouseover

Hello,

I'm using an Infragistics Listbar and I'm wondering what's the best way to change an item's image when the mouse moves over it.  I tried this:

private void ListBar_MouseMove(object sender, MouseEventArgs e)
{
   System.Windows.Forms.Control c = this.ListBar.GetChildAtPoint(e.Location);
   //then I'll somehow cast c as a listbar item and change the image...
}

but c is always null.  I'm surprised that this functionality isn't already built into the control, but I can't find any useful examples and the help isn't very helpful.  

I'm new to C# but I've been developing in other languages for a while (most recently VB6).

Any help is appreciated.  Thanks!
bussdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vo1dCommented:
what is Infragistics Listbar? a thirparty control?
if so, is there a sample control which i can download and check out?
0
bussdAuthor Commented:
Hi Vo1d,

It is a third party control and you can download a trial at

http://www.infragistics.com/downloads/downloadinfo.aspx?productid=129&type=0 

I haven't used the trial so I'm not sure how it's limited but hopefully it's functional enough to help.
0
vo1dCommented:
which .net framework do you use? 1.1 or 2.0?
i only have version 2.0, so i hope that they have the same functionality.
i will download it and make a test.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

bussdAuthor Commented:
I'm also using 2.0

Thanks!
0
vo1dCommented:
k, think i found a way.
you have to use the MouseEnterElement and MouseLeaveElement if you wanna change the items images.

example for mouseenterelement:

private void ultraListBar1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
        {
            if (e.Element is Infragistics.Win.UltraWinListBar.ItemImageUIElement)
            {
                Infragistics.Win.UltraWinListBar.ItemImageUIElement uiElement = e.Element as Infragistics.Win.UltraWinListBar.ItemImageUIElement;
               
               //change the uiElement.Item.LargeImageIndex or uiElement.Item.SmallImageIndex or uiElement.Image here
               
            }            
        }

to check, which item you got you could use the property uiElement.Item.Index
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bussdAuthor Commented:
Wow.  Impressively quick and useful solution.  Thank you!

I'm sure I'll have more questions as this project progresses. :)  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.