Cursor Cursor Cursor Cursor Constructors

Definition

Overloads

Cursor(Stream) Cursor(Stream) Cursor(Stream) Cursor(Stream)

Initializes a new instance of the Cursor class from the specified Stream.

Cursor(String) Cursor(String) Cursor(String) Cursor(String)

Initializes a new instance of the Cursor class from the specified .ani or a .cur file.

Cursor(Stream, Boolean) Cursor(Stream, Boolean) Cursor(Stream, Boolean) Cursor(Stream, Boolean)

Initializes a new instance of the Cursor class.

Cursor(String, Boolean) Cursor(String, Boolean) Cursor(String, Boolean) Cursor(String, Boolean)

Initializes a new instance of the Cursor class.

Cursor(Stream) Cursor(Stream) Cursor(Stream) Cursor(Stream)

Initializes a new instance of the Cursor class from the specified Stream.

public:
 Cursor(System::IO::Stream ^ cursorStream);
public Cursor (System.IO.Stream cursorStream);
new System.Windows.Input.Cursor : System.IO.Stream -> System.Windows.Input.Cursor
Public Sub New (cursorStream As Stream)

Parameters

cursorStream
Stream Stream Stream Stream

The Stream that contains the cursor.

Exceptions

This constructor was unable to create a temporary file.

Remarks

For a Stream, WPF writes the data to a temporary file and then loads the Cursor from the file. If this constructor is unable to create a temporary file, an IOException might be thrown. For example, an IOException might be thrown if a unique temporary file is not available. To resolve this error, try deleting unneeded temporary files.

See also

Cursor(String) Cursor(String) Cursor(String) Cursor(String)

Initializes a new instance of the Cursor class from the specified .ani or a .cur file.

public:
 Cursor(System::String ^ cursorFile);
public Cursor (string cursorFile);
new System.Windows.Input.Cursor : string -> System.Windows.Input.Cursor
Public Sub New (cursorFile As String)

Parameters

cursorFile
String String String String

The file that contains the cursor.

Exceptions

cursorFile is not an .ani or .cur file name.

See also

Cursor(Stream, Boolean) Cursor(Stream, Boolean) Cursor(Stream, Boolean) Cursor(Stream, Boolean)

Initializes a new instance of the Cursor class.

public:
 Cursor(System::IO::Stream ^ cursorStream, bool scaleWithDpi);
public Cursor (System.IO.Stream cursorStream, bool scaleWithDpi);
new System.Windows.Input.Cursor : System.IO.Stream * bool -> System.Windows.Input.Cursor
Public Sub New (cursorStream As Stream, scaleWithDpi As Boolean)

Parameters

cursorStream
Stream Stream Stream Stream

The Stream that contains the cursor.

scaleWithDpi
Boolean Boolean Boolean Boolean

true if to scale with dpi; otherwise, false.

Cursor(String, Boolean) Cursor(String, Boolean) Cursor(String, Boolean) Cursor(String, Boolean)

Initializes a new instance of the Cursor class.

public:
 Cursor(System::String ^ cursorFile, bool scaleWithDpi);
public Cursor (string cursorFile, bool scaleWithDpi);
new System.Windows.Input.Cursor : string * bool -> System.Windows.Input.Cursor
Public Sub New (cursorFile As String, scaleWithDpi As Boolean)

Parameters

cursorFile
String String String String

The Stream that contains the cursor.

scaleWithDpi
Boolean Boolean Boolean Boolean

true if to scale with dpi; otherwise, false.

Applies to