Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
How do I change the mouse cursor upon mouseover a cell?
posted

In the XamGrid, what is the best way to change the mouse cursor (to a hand) upon mouse-over cells in a particular column?

Parents
  • 17559
    posted

    Hello Andy99,

     

    I was looking into your question and I believe that depending on your specific scenario, different approaches may be more suitable for changing the mouse cursor. If the specific column you are referring is from type TemplatedColumn you can just set the Cursor property of the controls you use in the template. If this is not your case, I can suggest you handle the MouseEnder event for the CellControl and use the following code snippet:

            void Control_MouseEnter(object sender, MouseEventArgs e)

            {

                if ((sender as CellControl).Column.Key == "Name")

                    this.Cursor = Cursors.Hand;

                else

                    this.Cursor = Cursors.Arrow;

            }

    If you have any further questions on the matter, please do not hesitate to ask.

Reply Children