<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Fun with the WPF ScrollViewer</title>
	<atom:link href="http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html</link>
	<description>Real World .NET Methods, Tricks, and Examples</description>
	<lastBuildDate>Sat, 31 Jul 2010 00:54:16 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Luke Puplett</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9950</link>
		<dc:creator>Luke Puplett</dc:creator>
		<pubDate>Tue, 26 Jan 2010 19:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9950</guid>
		<description>http://msdn.microsoft.com/en-us/library/cc278062(VS.95).aspx

ScrollViewer is a mandatory part of a ListBox template and so should dependably be there for Silverlight and *probably* WPF when this model comes over to .NET 4.0.</description>
		<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/cc278062(VS.95).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/cc278062(VS.95).aspx</a></p>
<p>ScrollViewer is a mandatory part of a ListBox template and so should dependably be there for Silverlight and *probably* WPF when this model comes over to .NET 4.0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arash</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9941</link>
		<dc:creator>Arash</dc:creator>
		<pubDate>Sat, 09 Jan 2010 08:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9941</guid>
		<description>Ah, I found the answer - its a HitTest problem.

The solution is to do this instead:

var pos = e.GetPosition(this);
IsScrolling = pos.X &gt; presenter.ActualWidth;

That is to test for the vertical scrollbar.  Use ActualHeight to test for the horizontal scrollbar.</description>
		<content:encoded><![CDATA[<p>Ah, I found the answer &#8211; its a HitTest problem.</p>
<p>The solution is to do this instead:</p>
<p>var pos = e.GetPosition(this);<br />
IsScrolling = pos.X &gt; presenter.ActualWidth;</p>
<p>That is to test for the vertical scrollbar.  Use ActualHeight to test for the horizontal scrollbar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arash</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9940</link>
		<dc:creator>Arash</dc:creator>
		<pubDate>Sat, 09 Jan 2010 07:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9940</guid>
		<description>This doesn&#039;t seem to work at all - &quot;presenter.IsMouseOver&quot; always returns false for me, regardless of whether I click on the presenter area or the scrollbar area, either way, it is always false.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t seem to work at all &#8211; &#8220;presenter.IsMouseOver&#8221; always returns false for me, regardless of whether I click on the presenter area or the scrollbar area, either way, it is always false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo Zographos</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9924</link>
		<dc:creator>Theo Zographos</dc:creator>
		<pubDate>Thu, 10 Dec 2009 16:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9924</guid>
		<description>On Windows XP with classic theme, the control template is:
ClassicBorderDecorator &gt; ScrollViewer &gt; ItemsPresenter
while on Windows XP with XP theme, Windows Vista and Windows 7 is:
Border &gt; ScrollViewer &gt; ItemsPresenter

It&#039;s better to use Decorator since (ClassicBorderDecorator and Border both inherit from Decorator) because else it won&#039;t work in all cases...</description>
		<content:encoded><![CDATA[<p>On Windows XP with classic theme, the control template is:<br />
ClassicBorderDecorator &gt; ScrollViewer &gt; ItemsPresenter<br />
while on Windows XP with XP theme, Windows Vista and Windows 7 is:<br />
Border &gt; ScrollViewer &gt; ItemsPresenter</p>
<p>It&#8217;s better to use Decorator since (ClassicBorderDecorator and Border both inherit from Decorator) because else it won&#8217;t work in all cases&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9901</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Wed, 21 Oct 2009 13:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9901</guid>
		<description>No doubt that if the Template is different, the above code would fail.  It is brittle in that fashion, so if you were going to use this, you may need to enhance it some.  Perhaps a recursive search through the VisualTree until you find a ScrollViewer?</description>
		<content:encoded><![CDATA[<p>No doubt that if the Template is different, the above code would fail.  It is brittle in that fashion, so if you were going to use this, you may need to enhance it some.  Perhaps a recursive search through the VisualTree until you find a ScrollViewer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morten Aune Lyrstad</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9900</link>
		<dc:creator>Morten Aune Lyrstad</dc:creator>
		<pubDate>Wed, 21 Oct 2009 07:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9900</guid>
		<description>I know it&#039;s kinda late to be adding a comment to this topic, but wouldn&#039;t these methods also fail if the visual style of the ListBox has been changed? We use a search method which iterates through the control hierarchy to find the desired component.</description>
		<content:encoded><![CDATA[<p>I know it&#8217;s kinda late to be adding a comment to this topic, but wouldn&#8217;t these methods also fail if the visual style of the ListBox has been changed? We use a search method which iterates through the control hierarchy to find the desired component.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9886</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Mon, 14 Sep 2009 19:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9886</guid>
		<description>Thanks for the tip Fuzzy!</description>
		<content:encoded><![CDATA[<p>Thanks for the tip Fuzzy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fuzzy</title>
		<link>http://www.developingfor.net/wpf/fun-with-the-wpf-scrollviewer.html/comment-page-1#comment-9885</link>
		<dc:creator>Fuzzy</dc:creator>
		<pubDate>Mon, 14 Sep 2009 19:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.developingfor.net/?p=272#comment-9885</guid>
		<description>The following code will not work if the visual effects on the computer have been adjusted for &quot;best performance&quot; (System -&gt; Advanced -&gt; Performance Settings -&gt; Visual Effects):

Border scroll_border = VisualTreeHelper.GetChild(PhotosListBox, 0) as Border;

The cast to a Border object returns null because the child is actually of type Microsoft.Windows.Themes.ClassicBorderDecorator. 

Instead, cast to a System.Windows.Controls.Decorator object, which both types derive from.</description>
		<content:encoded><![CDATA[<p>The following code will not work if the visual effects on the computer have been adjusted for &#8220;best performance&#8221; (System -&gt; Advanced -&gt; Performance Settings -&gt; Visual Effects):</p>
<p>Border scroll_border = VisualTreeHelper.GetChild(PhotosListBox, 0) as Border;</p>
<p>The cast to a Border object returns null because the child is actually of type Microsoft.Windows.Themes.ClassicBorderDecorator. </p>
<p>Instead, cast to a System.Windows.Controls.Decorator object, which both types derive from.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
