Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

mouse pointer RSS

6 replies

Last post Mar 28, 2008 08:15 AM by mchlsync

(0)
  • igal

    igal

    Member

    50 Points

    26 Posts

    mouse pointer

    Mar 27, 2008 03:03 PM | LINK

    There is a list of predefined mouse pointers in Curosr class.

    I need a few other pointers, not listed in the class.

    Is the only way to accomplish this to change source code of SL2 library?

    Thanks in advance,

    Igal.

  • sladapter

    sladapter

    All-Star

    43607 Points

    7907 Posts

    Re: mouse pointer

    Mar 27, 2008 03:44 PM | LINK

     I have the same question. The current cursors list is very limited. How do we set cursors that is not in the list?

    Sally Xu
    Software Engineer
    Aprimo, Inc

    Please remember to mark the replies as answers if they answered your question
  • FLUID

    FLUID

    Member

    80 Points

    10 Posts

    Re: mouse pointer

    Mar 27, 2008 05:04 PM | LINK

    I'm afraid, there is no opportunity to do it in current Silverlight version.
    ---------------------------------------------------
    We don't possess what we don't understand
  • FredHirschfeld

    FredHirschfeld

    Participant

    928 Points

    165 Posts

    Re: mouse pointer

    Mar 27, 2008 05:21 PM | LINK

    In Silverlight 1.1, I had created my own CursorManager that allowed for unlimited custom cursors but I have not completed it fully nor converted it yet to 2.0. I have attached linked the initial 1.1 code so you can get some ideas on how it can be implemented but I do not remember where I left it off. I wanted to refactor it a little to make it more useful and generic but have not gotten there yet.

    With this you will see that the CursorManager uses Extensions to UIElement to allow 2 new methods to these classes: SetCursor and ClearCursor. This allows you to set any cursor to any control and it will handle the showing, moving and hiding...

     
    Fred Hirschfeld
    (If this answers your question please select "Mark as Answered")
  • igal

    igal

    Member

    50 Points

    26 Posts

    Re: mouse pointer

    Mar 27, 2008 05:40 PM | LINK

    Dear Fluid!

    You don't need to be afraid, you need to learn to keep silence when you don't know something.

    Sorry,

    Igal.

  • igal

    igal

    Member

    50 Points

    26 Posts

    Re: mouse pointer

    Mar 27, 2008 05:42 PM | LINK

    Dear Fred!

    Thanks a lot for your source. In a couple of week hopefully I will do something with it.

    Thanks a lot,

  • mchlSync

    mchlSync

    Star

    14968 Points

    2799 Posts

    Re: mouse pointer

    Mar 28, 2008 08:15 AM | LINK

    Hello Igal,

    You can also read this post http://silverlight.net/forums/p/7903/24586.aspx#24586 

    The following reply is from Yi-Lun, Microsoft. 

    Unfortunately currently Silverlight doesn’t support custom cursors. One solution is to set Cursor to None, and use an image/shape to follow the mouse move. You can find a sample named ”Ink Tattoo Studio” in the gallery. You can also download the code directly from this link.

     

    igal

    You don't need to be afraid, you need to learn to keep silence when you don't know something.
     

    Please don't say like that. We all here are learning something new and trying to help other people. So, our answers might be wrong sometimes. Thanks for understanding. :)  

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Regards,
    Michael Sync
    Silverlight MVP

    Blog : http://michaelsync.net