how to get the mouse's cursor type?


  • hello,everyone:

    I have a app,when the mouse point move around the app, the mouse cursor can change into different type in different place. so I want to get the mouse cursor type sometimes. but how to do it?


    now I have the code as follows:

          <InkCanvas EditingMode ="Select" MouseMove="CanvasMove">
            <Button Width ="100" Height ="80" Content ="Click"/>


    the code-behind is:


            void CanvasMove(object sender, object args)
                InkCanvas ink = (InkCanvas)sender;

                if (ink.Cursor != null)


    but the ink.Cursor is always null.


    so please give some tips




    Wednesday, October 31, 2007 7:30 AM

All replies

  • ink.Cursor is always null Coz you are not setting it

    Code Block

    <InkCanvas EditingMode ="Select" MouseMove="CanvasMove" Cursor="Cross">

    Wednesday, October 31, 2007 9:11 AM

    thanks for your answer!


    when I select a component in the InkCanvas, the border of the selected component has the shadow, when I move the mouse over the shadow, the cursor will change into another type. so how can I get this type, but I needn't to set the cursor type.

    Thursday, November 01, 2007 1:32 AM