News


Adorners in WPF

Another good find on CodeProject.

From the Introduction:

In WPF, an Adorner is special FrameworkElement that can be bounded to UIElement to allow a user to manipulate that element. By manipulate we mean:

  • Adding functional handles to a UIElement that enable the user to manipulate the element in some way (resize, rotate, reposition, etc.).
  • Provide visual feedback to indicate various states, or in response to various events.
  • Overlay visual decorations on a UIElement.
  • Visually mask or override part or the whole of UIElement.

WPF does not provide concrete adorners but it does provide the basic infrastructure. That means that you need to write your own special Adorner class.

A base infrastructure consists of next classes:

  • Adorner
    This is a base Adorner from which you will need to subclass.
  • AdornerLayer
    The AdornerLayer can be considered as a plane in which the Adorners are drawn.
  • AdornerDecorator
    Defines the location in visual tree of an AdornerLayer. Note: the Windows class already has it in the visual tree. It adds the default adorner layer above all other controls in the window.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Friday, May 18, 2007 9:22 AM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: