ContentElement
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.ContentElementText has distinctive layout requirements that are unlike those of
the rest of the user interface. Consequently, there is a separate part
of the class hierarchy for managing textual content. ContentElement is at the root of this
hierarchy, and it derives directly from DependencyObject, not Visual.
ContentElement is the base
class of FrameworkContentElement,
which is the base class of all the types in WPF's text object model. The
split between ContentElement and
FrameworkContentElement exists for
the same reason as the split between UIElement and FrameworkElement: ContentElement is part of WPF's core API,
whereas FrameworkContentElement is
part of WPF's framework API. The separation of responsibilities is
similar—ContentElement provides basic
event handling and animation support, and FrameworkContentElement adds data binding and
layout.
As with UIElement, you would
derive directly from ContentElement
only if you were writing your own UI framework on top of WPF's core
services. Most WPF applications will only use types derived from
FrameworkContentElement.