Reputation: 2293
If I use a regular windows form in PowerShell using this works.
$Form.Cursor = [System.Windows.Forms.Cursors]::WaitCursor
How can I achieve the same when dealing with a WPF application in PowerShell?
Upvotes: 1
Views: 2691
Reputation: 174505
The property name on WPF elements is the same (Cursor
).
Assign one of the static member values from the [System.Windows.Input.Cursors]
class:
$wpfElement.Cursor = [System.Windows.Input.Cursors]::Wait
Upvotes: 2