Skip to main content
Home Forums General Silverlight Getting Started Implement Cursor
5 replies. Latest Post by Yi-Lun Luo - MSFT on November 4, 2008.
(0)
shamrat231
Contributor
4667 points
595 Posts
11-02-2008 3:16 AM |
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)
robhouwe...
3158 points
540 Posts
11-02-2008 9:47 AM |
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
11-02-2008 10:05 PM |
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.
Yi-Lun L...
All-Star
25052 points
2,747 Posts
11-03-2008 11:45 PM |
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...
11-04-2008 9:09 AM |
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.
11-04-2008 10:50 PM |
I copied Mike's code to a local project, and it worked fine without any modifications. Can you share your project?