Table of Contents

Class VisualTargetPresentationSource

Namespace
HelixToolkit.Wpf.SharpDX
Assembly
HelixToolkit.Wpf.SharpDX.dll

The VisualTargetPresentationSource represents the root of a visual subtree owned by a different thread that the visual tree in which is is displayed. https://blogs.msdn.microsoft.com/dwayneneed/2007/04/26/multithreaded-ui-hostvisual/

public class VisualTargetPresentationSource : PresentationSource, IDisposable
Inheritance
VisualTargetPresentationSource
Implements
Inherited Members

Remarks

A HostVisual belongs to the same UI thread that owns the visual tree in which it resides.

A HostVisual can reference a VisualTarget owned by another thread.

A VisualTarget has a root visual.

VisualTargetPresentationSource wraps the VisualTarget and enables basic functionality like Loaded, which depends on a PresentationSource being available.

Constructors

VisualTargetPresentationSource(HostVisual)

public VisualTargetPresentationSource(HostVisual hostVisual)

Parameters

hostVisual HostVisual

Properties

DataContext

public object? DataContext { get; set; }

Property Value

object

IsDisposed

When overridden in a derived class, gets a value that declares whether the object is disposed.

public override bool IsDisposed { get; }

Property Value

bool

true if the object is disposed; otherwise, false.

PropertyName

public string? PropertyName { get; set; }

Property Value

string

RootVisual

When overridden in a derived class, gets or sets the root visual being presented in the source.

public override Visual RootVisual { get; set; }

Property Value

Visual

The root visual.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

[SuppressMessage("Microsoft.Usage", "CA2213", Justification = "False positive.")]
protected virtual void Dispose(bool disposing)

Parameters

disposing bool

GetCompositionTargetCore()

When overridden in a derived class, returns a visual target for the given source.

protected override CompositionTarget GetCompositionTargetCore()

Returns

CompositionTarget

Returns a CompositionTarget that is target for rendering the visual.

Events

SizeChanged

public event SizeChangedEventHandler? SizeChanged

Event Type

SizeChangedEventHandler