DrawingVisual Class

 

DrawingVisual is a visual object that can be used to render vector graphics on the screen. The content is persisted by the system.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.DependencyObject
      System.Windows.Media.Visual
        System.Windows.Media.ContainerVisual
          System.Windows.Media.DrawingVisual

Public Class DrawingVisual
	Inherits ContainerVisual

NameDescription
System_CAPS_pubmethodDrawingVisual()

Initializes a new instance of the DrawingVisual class.

NameDescription
System_CAPS_pubpropertyBitmapEffect

Obsolete.Gets or sets a BitmapEffect value for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyBitmapEffectInput

Obsolete.Gets or sets a BitmapEffectInput value for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyCacheMode

Gets or sets a cached representation of the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyChildren

Gets the child collection of the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyClip

Gets or sets the clipping region of the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyContentBounds

Gets the bounding box for the contents of the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyDependencyObjectType

Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject.)

System_CAPS_pubpropertyDescendantBounds

Gets the union of all the content bounding boxes for all of the descendants of the ContainerVisual, but not including the contents of the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyDrawing

Gets the drawing content of the DrawingVisual object.

System_CAPS_pubpropertyEffect

Gets or sets the bitmap effect to apply to the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyIsSealed

Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)

System_CAPS_pubpropertyOffset

Gets or sets the offset value of the ContainerVisual from its reference point.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyOpacity

Gets or sets the opacity of the ContainerVisual, based on 0=transparent, 1=opaque.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyOpacityMask

Gets or sets a brush that specifies a possible opacity mask for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyParent

Gets the parent Visual for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyTransform

Gets or sets the transform that is applied to the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_protpropertyVisualBitmapEffect

Obsolete.Gets or sets the BitmapEffect value for the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualBitmapEffectInput

Obsolete.Gets or sets the BitmapEffectInput value for the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualBitmapScalingMode

Gets or sets the BitmapScalingMode for the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualCacheMode

Gets or sets a cached representation of the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualChildrenCount

Gets the number of children for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_protpropertyVisualClearTypeHint

Gets or sets the ClearTypeHint that determines how ClearType is rendered in the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualClip

Gets or sets the clip region of the Visual as a Geometry value.(Inherited from Visual.)

System_CAPS_protpropertyVisualEdgeMode

Gets or sets the edge mode of the Visual as an EdgeMode value.(Inherited from Visual.)

System_CAPS_protpropertyVisualEffect

Gets or sets the bitmap effect to apply to the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualOffset

Gets or sets the offset value of the visual object.(Inherited from Visual.)

System_CAPS_protpropertyVisualOpacity

Gets or sets the opacity of the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualOpacityMask

Gets or sets the Brush value that represents the opacity mask of the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualParent

Gets the visual tree parent of the visual object.(Inherited from Visual.)

System_CAPS_protpropertyVisualScrollableAreaClip

Gets or sets a clipped scrollable area for the Visual. (Inherited from Visual.)

System_CAPS_protpropertyVisualTextHintingMode

Gets or sets the TextHintingMode of the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualTextRenderingMode

Gets or sets the TextRenderingMode of the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualTransform

Gets or sets the Transform value for the Visual.(Inherited from Visual.)

System_CAPS_protpropertyVisualXSnappingGuidelines

Gets or sets the x-coordinate (vertical) guideline collection.(Inherited from Visual.)

System_CAPS_protpropertyVisualYSnappingGuidelines

Gets or sets the y-coordinate (horizontal) guideline collection.(Inherited from Visual.)

System_CAPS_pubpropertyXSnappingGuidelines

Gets or sets the X (horizontal) guideline for the ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubpropertyYSnappingGuidelines

Gets or sets the Y (vertical) guideline for the ContainerVisual.(Inherited from ContainerVisual.)

NameDescription
System_CAPS_protmethodAddVisualChild(Visual)

Defines the parent-child relationship between two visuals.(Inherited from Visual.)

System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodClearValue(DependencyProperty)

Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.)

System_CAPS_pubmethodClearValue(DependencyPropertyKey)

Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.)

System_CAPS_pubmethodCoerceValue(DependencyProperty)

Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.(Inherited from DependencyObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether a provided DependencyObject is equivalent to the current DependencyObject.(Inherited from DependencyObject.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFindCommonVisualAncestor(DependencyObject)

Returns the common ancestor of two visual objects.(Inherited from Visual.)

System_CAPS_pubmethodGetHashCode()

Gets a hash code for this DependencyObject.(Inherited from DependencyObject.)

System_CAPS_pubmethodGetLocalValueEnumerator()

Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetValue(DependencyProperty)

Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.)

System_CAPS_protmethodGetVisualChild(Int32)

Returns a specified child Visual for the parent ContainerVisual.(Inherited from ContainerVisual.)

System_CAPS_pubmethodHitTest(HitTestFilterCallback, HitTestResultCallback, HitTestParameters)

Initiates a hit test on the ContainerVisual by using the HitTestFilterCallback and HitTestResultCallback objects.(Inherited from ContainerVisual.)

System_CAPS_pubmethodHitTest(Point)

Returns the top-most visual object of a hit test by specifying a Point.(Inherited from ContainerVisual.)

System_CAPS_protmethodHitTestCore(GeometryHitTestParameters)

Determines whether a geometry value is within the bounds of the visual object.(Overrides Visual.HitTestCore(GeometryHitTestParameters).)

System_CAPS_protmethodHitTestCore(PointHitTestParameters)

Determines whether a point coordinate value is within the bounds of the DrawingVisual object.(Overrides Visual.HitTestCore(PointHitTestParameters).)

System_CAPS_pubmethodInvalidateProperty(DependencyProperty)

Re-evaluates the effective value for the specified dependency property(Inherited from DependencyObject.)

System_CAPS_pubmethodIsAncestorOf(DependencyObject)

Determines whether the visual object is an ancestor of the descendant visual object.(Inherited from Visual.)

System_CAPS_pubmethodIsDescendantOf(DependencyObject)

Determines whether the visual object is a descendant of the ancestor visual object.(Inherited from Visual.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnDpiChanged(DpiScale, DpiScale)

Called when the DPI at which this View is rendered changes.(Inherited from Visual.)

System_CAPS_protmethodOnPropertyChanged(DependencyPropertyChangedEventArgs)

Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data. (Inherited from DependencyObject.)

System_CAPS_protmethodOnVisualChildrenChanged(DependencyObject, DependencyObject)

Called when the VisualCollection of the visual object is modified.(Inherited from Visual.)

System_CAPS_protmethodOnVisualParentChanged(DependencyObject)

Called when the parent of the visual object is changed.(Inherited from Visual.)

System_CAPS_pubmethodPointFromScreen(Point)

Converts a Point in screen coordinates into a Point that represents the current coordinate system of the Visual.(Inherited from Visual.)

System_CAPS_pubmethodPointToScreen(Point)

Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates.(Inherited from Visual.)

System_CAPS_pubmethodReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject.)

System_CAPS_protmethodRemoveVisualChild(Visual)

Removes the parent-child relationship between two visuals.(Inherited from Visual.)

System_CAPS_pubmethodRenderOpen()

Opens the DrawingVisual object for rendering. The returned DrawingContext value can be used to render into the DrawingVisual.

System_CAPS_pubmethodSetCurrentValue(DependencyProperty, Object)

Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetValue(DependencyProperty, Object)

Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetValue(DependencyPropertyKey, Object)

Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property. (Inherited from DependencyObject.)

System_CAPS_protmethodShouldSerializeProperty(DependencyProperty)

Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.(Inherited from DependencyObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodTransformToAncestor(Visual)

Returns a transform that can be used to transform coordinates from the Visual to the specified Visual ancestor of the visual object.(Inherited from Visual.)

System_CAPS_pubmethodTransformToAncestor(Visual3D)

Returns a transform that can be used to transform coordinates from the Visual to the specified Visual3D ancestor of the visual object.(Inherited from Visual.)

System_CAPS_pubmethodTransformToDescendant(Visual)

Returns a transform that can be used to transform coordinates from the Visual to the specified visual object descendant.(Inherited from Visual.)

System_CAPS_pubmethodTransformToVisual(Visual)

Returns a transform that can be used to transform coordinates from the Visual to the specified visual object.(Inherited from Visual.)

System_CAPS_pubmethodVerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

DrawingVisual is a lightweight drawing class that is used to render shapes, images, or text. This class is considered lightweight because it does not provide layout, input, focus, or event handling, which improves its performance. For this reason, drawings are ideal for backgrounds and clip art.

In order to use DrawingVisual objects, you need to create a host container for the objects. The host container object must be derived from the FrameworkElement class, which provides the layout and event handling support that the DrawingVisual class does not support. The host container object does not display any visual properties, since its main purpose is to contain child objects. For more information, see Using DrawingVisual Objects.

For a complete example showing how to create DrawingVisual objects with a host container, see the Hit Test Using DrawingVisuals Sample .

.NET Framework
Available since 3.0

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

Return to top
Show: