Skip to main content
.NET Framework Class Library
PresentationSource Class

Provides an abstract base for classes that present content from another technology as part of an interoperation scenario. In addition, this class provides static methods for working with these sources, as well as the basic visual-layer presentation architecture.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
Syntax
<[%$TOPIC/ms602984_en-us_VS_110_2_0_0_0_0%]([%$TOPIC/ms602984_en-us_VS_110_2_0_0_0_1%].InheritanceDemand, Unrestricted := True)> _
Public MustInherit Class PresentationSource _
	Inherits [%$TOPIC/ms602984_en-us_VS_110_2_0_0_0_2%]
[[%$TOPIC/ms602984_en-us_VS_110_2_0_1_0_0%]([%$TOPIC/ms602984_en-us_VS_110_2_0_1_0_1%].InheritanceDemand, Unrestricted = true)]
public abstract class PresentationSource : [%$TOPIC/ms602984_en-us_VS_110_2_0_1_0_2%]
[[%$TOPIC/ms602984_en-us_VS_110_2_0_2_0_0%]([%$TOPIC/ms602984_en-us_VS_110_2_0_2_0_1%]::InheritanceDemand, Unrestricted = true)]
public ref class PresentationSource abstract : public [%$TOPIC/ms602984_en-us_VS_110_2_0_2_0_2%]
[<[%$TOPIC/ms602984_en-us_VS_110_2_0_3_0_0%]>]
[<[%$TOPIC/ms602984_en-us_VS_110_2_0_3_0_1%]([%$TOPIC/ms602984_en-us_VS_110_2_0_3_0_2%].InheritanceDemand, Unrestricted = true)>]
type PresentationSource =  
    class 
        inherit [%$TOPIC/ms602984_en-us_VS_110_2_0_3_0_3%] 
    end

The PresentationSource type exposes the following members.

Constructors
  NameDescription
Protected method PresentationSourceProvides initialization for base class values when called by the constructor of a derived class.
Top
Properties
  NameDescription
Public property CompositionTargetGets the visual target for the visuals being presented in the source.
Public property Static member CurrentSourcesReturns a list of sources.
Public property DispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public property IsDisposedWhen overridden in a derived class, gets a value that declares whether the object is disposed.
Public property RootVisualWhen overridden in a derived class, gets or sets the root visual being presented in the source.
Top
Methods
  NameDescription
Protected method AddSourceAdds a PresentationSource derived class instance to the list of known presentation sources.
Public method Static member AddSourceChangedHandlerAdds a handler for the SourceChanged event to the provided element.
Public method CheckAccessDetermines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Protected method ClearContentRenderedListenersSets the list of listeners for the ContentRendered event to .
Public method Equals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member FromDependencyObjectReturns the source in which a provided DependencyObject is presented.
Public method Static member FromVisualReturns the source in which a provided Visual is presented.
Protected method GetCompositionTargetCoreWhen overridden in a derived class, returns a visual target for the given source.
Public method GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public method GetTypeGets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected method RemoveSourceRemoves a PresentationSource derived class instance from the list of known presentation sources.
Public method Static member RemoveSourceChangedHandlerRemoves a handler for the SourceChanged event from the provided element.
Protected method RootChangedProvides notification that the root Visual has changed.
Public method ToStringReturns a string that represents the current object. (Inherited from Object.)
Public method VerifyAccessEnforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top
Events
  NameDescription
Public event ContentRenderedOccurs when content is rendered and ready for user interaction.
Top
Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
.NET Framework Security
Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

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