Prev | Current Page 365 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

Cursor = Cursors.Wait
Now when you move the mouse over the current window, the mouse pointer changes to
the familiar hourglass icon (in Windows XP) or the swirl (in Windows Vista).
nNote The properties of the Cursors class draw on the cursors that are defined on the computer. If the user
has customized the set of standard cursors, the application you create will use those customized cursors.
If you set the cursor in XAML, you don??™t need to use the Cursors class directly. That??™s
because the TypeConverter for the Cursor property is able to recognize the property names
and retrieve the corresponding Cursor object from the Cursors class. That means you can
write markup like this to show the ???help??? cursor (a combination of an arrow and a question
mark) when the mouse is positioned over a button:

It??™s possible to have overlapping cursor settings. In this case, the most specific cursor
wins. For example, you could set a different cursor on a button and on the window that contains
the button. The button??™s cursor will be shown when you move the mouse over the
button, and the window??™s cursor will be used for every other region in the window.
However, there??™s one exception. A parent can override the cursor settings of its children
using the ForceCursor property.


Pages:
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377