Framework / Presentation Layer / Graphics / Interactivity Style / Cursor

In This Topic
    Cursor
    In This Topic

    Every object that has an interactivity style can have an associated cursor. Cursors are a very nice way to indicate to the end user that something will happen if he/she presses a mouse button. The cursor is represented by the NCursorAttribute class. You assign a cursor to the object by creating an instance of this class and adding it to the InteractivityAttributes collection. For example:

    C#
    Copy Code
    NCursorAttribute cursorAttribute = new NCursorAttribute(CursorType.Hand);
    someObject.InteractivityStyle.InteractivityAttributes.Add(cursorAttribute);
    
    Visual Basic
    Copy Code
    Dim cursorAttribute As New NCursorAttribute(CursorType.Hand)
    someObject.InteractivityStyle.InteractivityAttributes.Add(cursorAttribute)
    

    You can also use the Cursor property of the NInteractivityStyle object:

    C#
    Copy Code
    someObject.InteractivityStyle.Cursor = new NCursorAttribute(CursorType.Hand);
    
    Visual Basic
    Copy Code
    someObject.InteractivityStyle.Cursor = New NCursorAttribute(CursorType.Hand)
    
    See Also