Prev | Current Page 380 | Next

Matthew MacDonald

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

As a result, tooltips always disappear after a configurable
amount of time (usually about 5 seconds) or when the
user moves the mouse away. If you want to create a tooltiplike
window that stays open indefinitely, the easiest approach
is to use the Popup control.
Using the ToolTip properties, the following markup creates a tooltip that has no drop
shadow but uses a transparent red background that lets the underlying window (and controls)
show through:

In most cases, you??™ll be happy enough to use the standard tooltip placement, which puts
it at the current mouse position. However, the various ToolTip properties give you many more
options. Here are some strategies you can use to place a tooltip:
??? Based on the current position of the mouse. This is the standard behavior, which relies
on Placement being set to Mouse. The top-left corner of the tooltip box is lined up with
the bottom-left corner of the invisible ???bounding box??? around the mouse pointer.


Pages:
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392