Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
407 lines (387 sloc) 24.2 KB
<Type Name="AdornerLayer" FullName="System.Windows.Documents.AdornerLayer">
<TypeSignature Language="C#" Value="public class AdornerLayer : System.Windows.FrameworkElement" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AdornerLayer extends System.Windows.FrameworkElement" />
<TypeSignature Language="DocId" Value="T:System.Windows.Documents.AdornerLayer" />
<TypeSignature Language="VB.NET" Value="Public Class AdornerLayer&#xA;Inherits FrameworkElement" />
<TypeSignature Language="C++ CLI" Value="public ref class AdornerLayer : System::Windows::FrameworkElement" />
<TypeSignature Language="F#" Value="type AdornerLayer = class&#xA; inherit FrameworkElement" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.FrameworkElement</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents a surface for rendering adorners.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An adorner layer is guaranteed to be at a higher Z-order than the element(s) being adorned, so adorners are always rendered on top of the adorned element.
> [!NOTE]
> The parent of an <xref:System.Windows.Documents.Adorner> is the <xref:System.Windows.Documents.AdornerLayer> that renders the **Adorner**, not the element being adorned.
> [!NOTE]
> Anything placed in the adorner layer is rendered on top of the rest of any styles you have set. In other words, adorners are always visually on top and cannot be overridden using z-order.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Documents.AdornerDecorator" />
<altmember cref="T:System.Windows.Documents.Adorner" />
<related type="ExternalDocumentation" href="https://github.com/Microsoft/WPF-Samples/tree/master/Sample%20Applications/PhotoViewerDemo">WPF Photo Viewer Demo</related>
</Docs>
<Members>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public void Add (System.Windows.Documents.Adorner adorner);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Add(class System.Windows.Documents.Adorner adorner) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.Add(System.Windows.Documents.Adorner)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Add(System::Windows::Documents::Adorner ^ adorner);" />
<MemberSignature Language="F#" Value="member this.Add : System.Windows.Documents.Adorner -&gt; unit" Usage="adornerLayer.Add adorner" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="adorner" Type="System.Windows.Documents.Adorner" />
</Parameters>
<Docs>
<param name="adorner">The adorner to add.</param>
<summary>Adds an adorner to the adorner layer.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">Raised when *adorner* is **null**.</exception>
</Docs>
</Member>
<Member MemberName="AdornerHitTest">
<MemberSignature Language="C#" Value="public System.Windows.Media.AdornerHitTestResult AdornerHitTest (System.Windows.Point point);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Media.AdornerHitTestResult AdornerHitTest(valuetype System.Windows.Point point) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.AdornerHitTest(System.Windows.Point)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Media::AdornerHitTestResult ^ AdornerHitTest(System::Windows::Point point);" />
<MemberSignature Language="F#" Value="member this.AdornerHitTest : System.Windows.Point -&gt; System.Windows.Media.AdornerHitTestResult" Usage="adornerLayer.AdornerHitTest point" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.AdornerHitTestResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="point" Type="System.Windows.Point" />
</Parameters>
<Docs>
<param name="point">The point to hit test.</param>
<summary>Gets an <see cref="T:System.Windows.Media.AdornerHitTestResult" /> for a specified point.</summary>
<returns>An <see cref="T:System.Windows.Media.AdornerHitTestResult" /> for the specified point.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An <xref:System.Windows.Media.AdornerHitTestResult> contains the <xref:System.Windows.Media.Visual> that was hit, and the adorner that the visual is part of.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ArrangeOverride">
<MemberSignature Language="C#" Value="protected override System.Windows.Size ArrangeOverride (System.Windows.Size finalSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size ArrangeOverride(valuetype System.Windows.Size finalSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.ArrangeOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ArrangeOverride (finalSize As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size ArrangeOverride(System::Windows::Size finalSize);" />
<MemberSignature Language="F#" Value="override this.ArrangeOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="adornerLayer.ArrangeOverride finalSize" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="finalSize" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="finalSize">The size reserved for this element by its parent.</param>
<summary>Positions child elements and determines a size for the <see cref="T:System.Windows.Documents.AdornerLayer" />.</summary>
<returns>The actual size needed by the element. This return value is typically the same as the value passed to *finalSize*.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Windows.FrameworkElement.ArrangeOverride%2A>.
]]></format>
</remarks>
<altmember cref="M:System.Windows.UIElement.Arrange(System.Windows.Rect)" />
</Docs>
</Member>
<Member MemberName="GetAdornerLayer">
<MemberSignature Language="C#" Value="public static System.Windows.Documents.AdornerLayer GetAdornerLayer (System.Windows.Media.Visual visual);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Windows.Documents.AdornerLayer GetAdornerLayer(class System.Windows.Media.Visual visual) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.GetAdornerLayer(System.Windows.Media.Visual)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Windows::Documents::AdornerLayer ^ GetAdornerLayer(System::Windows::Media::Visual ^ visual);" />
<MemberSignature Language="F#" Value="static member GetAdornerLayer : System.Windows.Media.Visual -&gt; System.Windows.Documents.AdornerLayer" Usage="System.Windows.Documents.AdornerLayer.GetAdornerLayer visual" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Documents.AdornerLayer</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="visual" Type="System.Windows.Media.Visual" />
</Parameters>
<Docs>
<param name="visual">The visual element for which to find an adorner layer.</param>
<summary>Returns the first adorner layer in the visual tree above a specified <see cref="T:System.Windows.Media.Visual" />.</summary>
<returns>An adorner layer for the specified visual, or **null** if no adorner layer can be found.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This `static` method traverses up the visual tree starting at the specified <xref:System.Windows.Media.Visual> and returns the first adorner layer found.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">Raised when *visual* is **null**.</exception>
</Docs>
</Member>
<Member MemberName="GetAdorners">
<MemberSignature Language="C#" Value="public System.Windows.Documents.Adorner[] GetAdorners (System.Windows.UIElement element);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Documents.Adorner[] GetAdorners(class System.Windows.UIElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.GetAdorners(System.Windows.UIElement)" />
<MemberSignature Language="VB.NET" Value="Public Function GetAdorners (element As UIElement) As Adorner()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; cli::array &lt;System::Windows::Documents::Adorner ^&gt; ^ GetAdorners(System::Windows::UIElement ^ element);" />
<MemberSignature Language="F#" Value="member this.GetAdorners : System.Windows.UIElement -&gt; System.Windows.Documents.Adorner[]" Usage="adornerLayer.GetAdorners element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Documents.Adorner[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
</Parameters>
<Docs>
<param name="element">The <see cref="T:System.Windows.UIElement" /> to retrieve an array of adorners for.</param>
<summary>Returns an array of adorners that are bound to the specified <see cref="T:System.Windows.UIElement" />.</summary>
<returns>An array of adorners that decorate the specified <see cref="T:System.Windows.UIElement" />, or **null** if there are no adorners bound to the specified element.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetVisualChild">
<MemberSignature Language="C#" Value="protected override System.Windows.Media.Visual GetVisualChild (int index);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Media.Visual GetVisualChild(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.GetVisualChild(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetVisualChild (index As Integer) As Visual" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Media::Visual ^ GetVisualChild(int index);" />
<MemberSignature Language="F#" Value="override this.GetVisualChild : int -&gt; System.Windows.Media.Visual" Usage="adornerLayer.GetVisualChild index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Visual</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The index position of the wanted <see cref="T:System.Windows.Media.Visual" /> child.</param>
<summary>Gets a <see cref="T:System.Windows.Media.Visual" /> child at the specified <paramref name="index" /> position.</summary>
<returns>A <see cref="T:System.Windows.Media.Visual" /> child of the parent <see cref="T:System.Windows.Documents.AdornerLayer" /> element.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A derived class must implement this method to support <xref:System.Windows.Media.Visual> children. The method must return the child at the specified index. The index must be between `0` and (<xref:System.Windows.Documents.AdornerLayer.VisualChildrenCount%2A>`-1`).
]]></format>
</remarks>
<altmember cref="P:System.Windows.Documents.AdornerLayer.VisualChildrenCount" />
</Docs>
</Member>
<Member MemberName="LogicalChildren">
<MemberSignature Language="C#" Value="protected internal override System.Collections.IEnumerator LogicalChildren { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator LogicalChildren" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.AdornerLayer.LogicalChildren" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides ReadOnly Property LogicalChildren As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LogicalChildren : System.Collections.IEnumerator" Usage="System.Windows.Documents.AdornerLayer.LogicalChildren" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an enumerator that can iterate the logical child elements of this <see cref="T:System.Windows.Documents.AdornerLayer" /> element.</summary>
<value>An <see cref="T:System.Collections.IEnumerator" />. This property has no default value.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MeasureOverride">
<MemberSignature Language="C#" Value="protected override System.Windows.Size MeasureOverride (System.Windows.Size constraint);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size MeasureOverride(valuetype System.Windows.Size constraint) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.MeasureOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function MeasureOverride (constraint As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size MeasureOverride(System::Windows::Size constraint);" />
<MemberSignature Language="F#" Value="override this.MeasureOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="adornerLayer.MeasureOverride constraint" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="constraint" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="constraint">Unused.</param>
<summary>Measures the size required for child elements and determines a size for the <see cref="T:System.Windows.Documents.AdornerLayer" />.</summary>
<returns>This method always returns a <see cref="T:System.Windows.Size" /> of (0,0).</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Documents.AdornerLayer> should be the same size as its parent and consume no layout space.
This method overrides <xref:System.Windows.FrameworkElement.MeasureOverride%2A>.
]]></format>
</remarks>
<altmember cref="M:System.Windows.UIElement.Measure(System.Windows.Size)" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (System.Windows.Documents.Adorner adorner);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Remove(class System.Windows.Documents.Adorner adorner) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.Remove(System.Windows.Documents.Adorner)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Remove(System::Windows::Documents::Adorner ^ adorner);" />
<MemberSignature Language="F#" Value="member this.Remove : System.Windows.Documents.Adorner -&gt; unit" Usage="adornerLayer.Remove adorner" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="adorner" Type="System.Windows.Documents.Adorner" />
</Parameters>
<Docs>
<param name="adorner">The <see cref="T:System.Windows.Documents.Adorner" /> to remove.</param>
<summary>Removes the specified <see cref="T:System.Windows.Documents.Adorner" /> from the adorner layer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method simply returns if the specified adorner does not exist.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">Raised when *adorner* is **null**.</exception>
</Docs>
</Member>
<MemberGroup MemberName="Update">
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Updates the layout and redraws all of the adorners in the adorner layer.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public void Update ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Update() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.Update" />
<MemberSignature Language="VB.NET" Value="Public Sub Update ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Update();" />
<MemberSignature Language="F#" Value="member this.Update : unit -&gt; unit" Usage="adornerLayer.Update " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Updates the layout and redraws all of the adorners in the adorner layer.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public void Update (System.Windows.UIElement element);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Update(class System.Windows.UIElement element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Documents.AdornerLayer.Update(System.Windows.UIElement)" />
<MemberSignature Language="VB.NET" Value="Public Sub Update (element As UIElement)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Update(System::Windows::UIElement ^ element);" />
<MemberSignature Language="F#" Value="member this.Update : System.Windows.UIElement -&gt; unit" Usage="adornerLayer.Update element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.UIElement" />
</Parameters>
<Docs>
<param name="element">The <see cref="T:System.Windows.UIElement" /> associated with the adorners to update.</param>
<summary>Updates the layout and redraws all of the adorners in the adorner layer that are bound to the specified <see cref="T:System.Windows.UIElement" />.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">Raised when *element* is **null**.</exception>
<exception cref="T:System.InvalidOperationException">Raised when the specified element cannot be found.</exception>
</Docs>
</Member>
<Member MemberName="VisualChildrenCount">
<MemberSignature Language="C#" Value="protected override int VisualChildrenCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 VisualChildrenCount" />
<MemberSignature Language="DocId" Value="P:System.Windows.Documents.AdornerLayer.VisualChildrenCount" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property VisualChildrenCount As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property int VisualChildrenCount { int get(); };" />
<MemberSignature Language="F#" Value="member this.VisualChildrenCount : int" Usage="System.Windows.Documents.AdornerLayer.VisualChildrenCount" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of child <see cref="T:System.Windows.Media.Visual" /> objects in this instance of <see cref="T:System.Windows.Documents.AdornerLayer" />.</summary>
<value>The number of child <see cref="T:System.Windows.Media.Visual" /> objects in this instance of <see cref="T:System.Windows.Documents.AdornerLayer" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Derived classes override this property to enable the Visual code to enumerate the Visual children. Derived classes need to return the number of children from this method.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Documents.AdornerLayer.GetVisualChild(System.Int32)" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.