Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Visual Class
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Visual Class

Updated: July 2008

Provides rendering support in WPF, which includes hit testing, coordinate transformation, and bounding box calculations.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
Visual Basic (Declaration)
Public MustInherit Class Visual _
    Inherits DependencyObject
Visual Basic (Usage)
Dim instance As Visual
C#
public abstract class Visual : DependencyObject
Visual C++
public ref class Visual abstract : public DependencyObject
JScript
public abstract class Visual extends DependencyObject
XAML
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

The Visual class is the basic abstraction from which every FrameworkElement object derives. It also serves as the entry point for writing new controls in WPF, and in many ways can be thought of as an equivalent of a window handle (HWND) in the Win32 application model.

The Visual object is a core WPF object, whose primary role is to provide rendering support. User interface controls, such as Button and TextBox, derive from the Visual class, and use the Visual defined properties for persisting their rendering data. The Visual object provides support for the following:

  • Output display: Rendering the persisted, serialized drawing content of a visual.

  • Transformations: Performing transformations on a visual.

  • Clipping: Providing clipping region support for a visual.

  • Hit testing: Determining whether a specified coordinate (point) or geometry is contained within the bounds of a visual.

  • Bounding box calculations: Determining the bounding rectangle of a visual.

Architecturally, the Visual object does not include support for other application development requirements / WPF features that are not immediately related to its rendering, such as the following:

  • Event handling

  • Layout

  • Styles

  • Data binding

  • Globalization

Visual is provided as a public abstract class from which further classes can be derived. The following illustration shows the hierarchy of the existing visual objects that are defined in the WPF architecture.

Visual class hierarchy

Diagram of classes derived from the Visual object

In some cases, members that are defined as protected in Visual are exposed as more readily accessible members with similar names in the derived UIElement class.

For more information, see Windows Presentation Foundation Graphics Rendering Overview.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Date

History

Reason

July 2008

Added new member: VisualEffect property.

SP1 feature change.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker