<?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: WPF: Changing Input Focus to Hidden Elements</title>
	<atom:link href="http://www.leghumped.com/blog/2009/07/31/wpf-changing-input-focus-to-hidden-elements/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leghumped.com/blog/2009/07/31/wpf-changing-input-focus-to-hidden-elements/</link>
	<description>Coding snippets, tutorials and procrastinations about C#, Java and Linux.</description>
	<lastBuildDate>Mon, 28 Jun 2010 09:06:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: cretz</title>
		<link>http://www.leghumped.com/blog/2009/07/31/wpf-changing-input-focus-to-hidden-elements/comment-page-1/#comment-5736</link>
		<dc:creator>cretz</dc:creator>
		<pubDate>Sat, 29 Aug 2009 10:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=363#comment-5736</guid>
		<description>In my opinion, the solution with using the dispatcher invoke is better, because with your solution you have to remember to remove the event handler. The dispatcher code is clean and leaves no &quot;traces&quot; that can affect garbage collection. There is no cross-thread access in your case, because you don&#039;t set the focus from another thread (in that case your solution would not work at all). It&#039;s just delaying the execution of your code until the next layout pass is completed, so that your control is indeed visible.
The dispatcher offers a way to schedule some code to be executed in the UI thread&#039;s infinite loop (priorities specify where in the loop iteration your code is called).</description>
		<content:encoded><![CDATA[<p>In my opinion, the solution with using the dispatcher invoke is better, because with your solution you have to remember to remove the event handler. The dispatcher code is clean and leaves no &#8220;traces&#8221; that can affect garbage collection. There is no cross-thread access in your case, because you don&#8217;t set the focus from another thread (in that case your solution would not work at all). It&#8217;s just delaying the execution of your code until the next layout pass is completed, so that your control is indeed visible.<br />
The dispatcher offers a way to schedule some code to be executed in the UI thread&#8217;s infinite loop (priorities specify where in the loop iteration your code is called).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

