??? Based on the position of the moused-over element. Set the Placement property to Left,
Right, Top, Bottom, or Center, depending on the edge of the element you want to use.
The top-left corner of the tooltip box will be lined up with that edge.
CHAPTER 7 n CLASSIC CONTROLS 201
??? Based on the position of another element (or the window). Set the Placement property
in the same way you would if you were lining the tooltip up with the current
element. (Use the value Left, Right, Top, Bottom, or Center.) Then choose the
element by setting the PlacementTarget property. Remember to use the {Binding
ElementName=Name} syntax to identify the element you want to use.
??? With an offset. Use any of the strategies described previously, but set the
HorizontalOffset and VerticalOffset properties to add a little extra space.
??? Using absolute coordinates. Set Placement to Absolute and use the HorizontalOffset
and VerticalOffset properties (or the PlacementRectangle) to set some space between
the tooltip and the top-left corner of the window.
??? Using a calculation at runtime. Set Placement to Custom. Set the CustomPopup
PlacementCallback property to point to a method that you??™ve created.
Figure 7-4 shows how different placement properties stack up. Note that when lining up a
tooltip against an element along the tooltip??™s bottom or right edge, you??™ll end up with a tiny bit
of extra space.
Pages:
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393