Skip to main content

Microsoft Silverlight

Unanswered Question Implement CursorRSS Feed

(0)

shamrat231
shamrat231

Contributor

Contributor

4667 points

595 Posts

Implement Cursor

Hi,

I found an article http://silverlight.net/blogs/msnow/archive/2008/08/18/tip-of-the-day-28-how-to-implement-a-custom-mouse-cursor.aspx and the demo code on silverlight 2.0 released and it didnot work. The icon didnot show. In the example it was using a jpg pic instead of cursor file.

I am looking for a way to implement my cursor.cur or image file on the cursor icon. I have multiple themes and with each theme i want to able to change the cursor file as i want. Now my question has anyone give me a solution or any code demo on how to change the cursor icon in silverlight 2.0 released version.

Sharker Khaleed Mahmud(MCPD)

 

Dhaka, Bangladesh
LinkedIn :: SL Profile :: Blog

robhouweling
robhouwe...

Contributor

Contributor

3158 points

540 Posts

Silverlight MVP

Re: Implement Cursor

As to my knowledge .cur files are not supported so you would have to use jpg or png images.

The solution of Mike Snow should work fine. Did you try this with an image instead of a .cur file?

(If this has answered your question, please click on mark as answer on this post)

Cheers!
Rob Houweling



My blog

shamrat231
shamrat231

Contributor

Contributor

4667 points

595 Posts

Re: Implement Cursor

Hi, i tried it with jpg, the solution of mike snow is not working. When i was using S2 B2 it worked, but now even, i visit his demo url, the page donot show the pic or the mouse cursor. Here is the demo link posted by Mike Snow.

 http://silverlight.services.live.com/invoke/66033/Custom%20Cursor%20Demo/iframe.html 

i tried the code...the output result is same as the above link. I am using S2 RTW(2.0.31005). Could you tell me why the pic is not showing on the demo link?.

It would be helpful if there is a working source code in S2 RTW to download.

Sharker Khaleed Mahmud(MCPD)

Dhaka, Bangladesh
LinkedIn :: SL Profile :: Blog

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Re: Implement Cursor

Hello, Beta 2 applications won't work with RTW runtime. That's why Mike's demo doesn't work for you. But his code should still be valid. Have you modified it? Also, is your jpg file valid? By any chance you simply renamed a cur file to jpg? This will of course doesn't work...

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

shamrat231
shamrat231

Contributor

Contributor

4667 points

595 Posts

Re: Implement Cursor

No, it is a valid jpg file. The above demo link is in RTW. and that donot show the jpg icon. The output is same as in my output. That is why i just want to know what is it that i have to change in code so the pic would actually show.

Sharker Khaleed Mahmud(MCPD)

Dhaka, Bangladesh
LinkedIn :: SL Profile :: Blog

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Re: Re: Implement Cursor

I copied Mike's code to a local project, and it worked fine without any modifications. Can you share your project?

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities