<?xml version="1.0" encoding="iso-8859-1"?><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: Overlaying Controls in WPF with Adorners</title>
	<atom:link href="http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/feed/" rel="self" type="application/rss+xml" />
	<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/</link>
	<description>...my blog on what I&#039;m learning, working, or playing with in technology</description>
	<lastBuildDate>Thu, 26 Jan 2012 16:31:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: Agogeannelle</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-1357</link>
		<dc:creator>Agogeannelle</dc:creator>
		<pubDate>Sat, 10 Dec 2011 18:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-1357</guid>
		<description>buy  at my estore   with confident</description>
		<content:encoded><![CDATA[<p>buy  at my estore   with confident</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gRanslant</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-1308</link>
		<dc:creator>gRanslant</dc:creator>
		<pubDate>Mon, 04 Jul 2011 14:58:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-1308</guid>
		<description>Hi

Thanks a lot for your code, it made overlays very easy to understand for me.

About keyboard navigation remaining active in the background:
experimenting with keyboard focus was a big pain and did not give satisfying results (I may have done it wrong) so my solution, to make sure the user can only interact with the following is to do the following:

using (OverlayAdorner.Overlay(LayoutRoot))
{
    // disable the whole background
    layoutRoot.IsEnabled = false;
   
   // do some stuff here while overlaid
}

Obviously layoutRoot has to be enabled again when the overlay is disposed of.

This may be ugly and bruteforce-y, but it does the job. Kinda. Indeed  if layoutRoot has many items, then it will take some time to render all of them disabled, and this may mess up any animation done to make the overlay appear.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Thanks a lot for your code, it made overlays very easy to understand for me.</p>
<p>About keyboard navigation remaining active in the background:<br />
experimenting with keyboard focus was a big pain and did not give satisfying results (I may have done it wrong) so my solution, to make sure the user can only interact with the following is to do the following:</p>
<p>using (OverlayAdorner.Overlay(LayoutRoot))<br />
{<br />
    // disable the whole background<br />
    layoutRoot.IsEnabled = false;</p>
<p>   // do some stuff here while overlaid<br />
}</p>
<p>Obviously layoutRoot has to be enabled again when the overlay is disposed of.</p>
<p>This may be ugly and bruteforce-y, but it does the job. Kinda. Indeed  if layoutRoot has many items, then it will take some time to render all of them disabled, and this may mess up any animation done to make the overlay appear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Takeo</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-419</link>
		<dc:creator>Takeo</dc:creator>
		<pubDate>Sun, 05 Sep 2010 17:10:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-419</guid>
		<description>Hello,

Seems that I needed to replace &quot;.DesiredSize&quot; by .&quot;RenderSize&quot; in:

protected override Size ArrangeOverride(Size finalSize)
        {
            if (_adorningElement != null)
            {
                Point adorningPoint = new Point(0, 0);
                //_adorningElement.Arrange(new Rect(adorningPoint, this.AdornedElement.DesiredSize));
                _adorningElement.Arrange(new Rect(adorningPoint, this.AdornedElement.RenderSize));
            }
            return finalSize;
        }

in order to get the overlay correctly resized.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Seems that I needed to replace &#8220;.DesiredSize&#8221; by .&#8221;RenderSize&#8221; in:</p>
<p>protected override Size ArrangeOverride(Size finalSize)<br />
        {<br />
            if (_adorningElement != null)<br />
            {<br />
                Point adorningPoint = new Point(0, 0);<br />
                //_adorningElement.Arrange(new Rect(adorningPoint, this.AdornedElement.DesiredSize));<br />
                _adorningElement.Arrange(new Rect(adorningPoint, this.AdornedElement.RenderSize));<br />
            }<br />
            return finalSize;<br />
        }</p>
<p>in order to get the overlay correctly resized.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: K</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-408</link>
		<dc:creator>K</dc:creator>
		<pubDate>Fri, 03 Sep 2010 14:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-408</guid>
		<description>Thanks for the utility.  When I call OverlayAdorner with my element, I do not see it on screen.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Thanks for the utility.  When I call OverlayAdorner with my element, I do not see it on screen.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diryboy</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-252</link>
		<dc:creator>diryboy</dc:creator>
		<pubDate>Sat, 17 Oct 2009 20:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-252</guid>
		<description>nice post! just in time. i need this function in my little project. thank you!</description>
		<content:encoded><![CDATA[<p>nice post! just in time. i need this function in my little project. thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-249</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 15 Oct 2009 20:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-249</guid>
		<description>See previous post, who&#039;s had time to look at new Blend 3 SDK features?  Besides, you should hear some of the stories about some of the people that work on Blend 3, not to be trusted.</description>
		<content:encoded><![CDATA[<p>See previous post, who&#8217;s had time to look at new Blend 3 SDK features?  Besides, you should hear some of the stories about some of the people that work on Blend 3, not to be trusted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Chase</title>
		<link>http://bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/comment-page-1/#comment-248</link>
		<dc:creator>Justin Chase</dc:creator>
		<pubDate>Thu, 15 Oct 2009 20:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bignickolson.com/2009/10/15/overlaying-controls-in-wpf-with-adorners/#comment-248</guid>
		<description>You could probably do this nicely with a Behavior as well. They have a lot better design time support in Blend as well.</description>
		<content:encoded><![CDATA[<p>You could probably do this nicely with a Behavior as well. They have a lot better design time support in Blend as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

