Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I read your question correctly and since you didn't mention it yourself you might be looking for the <a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.adornerdecorator.aspx" rel="nofollow noreferrer"><code>AdornerDecorator Class</code></a>, which <em>Provides an adorner layer for elements beneath it in the visual tree</em>.</p> <p>Assuming from its name that <code>ScrollPresenter</code> is derived from <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.contentpresenter.aspx" rel="nofollow noreferrer"><code>ContentPresenter</code></a>, it's worth noting that for implementing advanced custom controls you might want to surround their <code>ContentPresenter</code> by an <code>AdornerDecorator</code>, just like the <a href="http://msdn.microsoft.com/en-us/library/system.windows.window.aspx" rel="nofollow noreferrer"><code>Window Class</code></a> does, see for example <a href="http://blog.pixelingene.com/2006/11/dont-forget-the-adornerdecorator/" rel="nofollow noreferrer">Don’t forget the AdornerDecorator</a> for a nice real work scenario involving drag&amp;drop too.</p> <p>That is, by means of the <a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.adornerdecorator.aspx" rel="nofollow noreferrer"><code>AdornerDecorator</code></a> you'll ensure the required <a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.adornerlayer.aspx" rel="nofollow noreferrer"><code>AdornerLayer</code></a> to be contained within your custom control, hence removing the need to retrieve it elsewhere by walking up the visual tree, e.g.:</p> <pre><code> &lt;ControlTemplate TargetType="{x:Type CustomWindow}"&gt; &lt;Border ...&gt; &lt;Grid&gt; &lt;AdornerDecorator&gt; &lt;ScrollPresenter ... /&gt; &lt;/AdornerDecorator&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;/ControlTemplate&gt; </code></pre> <p>Depending on your particular scenario you might need an <code>AdornerDecorator</code> for your custom windows, your custom controls or both.</p> <p>See <a href="http://msdn.microsoft.com/en-us/library/ms743737.aspx" rel="nofollow noreferrer">Adorners Overview</a> for more details on the adorner architecture.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload