Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your UI scenario sounds kinda strange to me, but if you still want to implement it then you can do the following. You are not getting event raised for the paren becaus ItemsControl marks it as handled, so it is not <a href="http://msdn.microsoft.com/en-us/library/ms742806.aspx" rel="nofollow">routed further</a>. You can subscribe to <a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.previewmousedown.aspx" rel="nofollow">PreviewMouseDown</a> event instead of MouseDown in the parent. Then no matter what the parent will receive notification before it's children.</p> <p><strong>UPDATE</strong></p> <p>You can do the following </p> <pre><code>&lt;ScrollViewer&gt; &lt;Grid MouseDown="HandleMouseDown"&gt; &lt;TextBlock /&gt; &lt;ItemsControl IsHitTestVisible="false"/&gt; &lt;/Grid&gt; &lt;/ScrollViewer&gt; </code></pre> <p>So you will have scroll for text block and for items. ItemsControl's own scroll bars will not be used.</p> <p><strong>UPDATE 2</strong></p> <p>If you want to have separate ScrollViewers, then another possibility can be the following (although I think some of borders and grids are really unneeded. Only if they are functional in your snippet)</p> <pre><code> &lt;Grid&gt; &lt;Border&gt; &lt;ScrollViewer&gt; &lt;TextBlock MouseDown="HandleMouseDown"&gt; &lt;/ScrollViewer&gt; &lt;Border&gt; &lt;Border&gt; &lt;Grid&gt; &lt;ScrollViewer&gt; &lt;Grid MouseDown="HandleMouseDown"&gt; &lt;ItemsControl IsHitTestVisible="false"/&gt; &lt;/Grid&gt; &lt;/ScrollViewer&gt; &lt;/Grid&gt; &lt;Border&gt; &lt;/Grid&gt; </code></pre>
    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. 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