<?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: Template parts and custom controls (quick tip)</title>
	<atom:link href="http://www.jeff.wilcox.name/2010/04/template-part-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/</link>
	<description>Silverlight, rich client apps and web development</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:09:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jeff Wilcox</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2411</link>
		<dc:creator>Jeff Wilcox</dc:creator>
		<pubDate>Tue, 06 Apr 2010 00:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2411</guid>
		<description>Some controls such as transitioning content control may on purpose keep references longer than that.</description>
		<content:encoded><![CDATA[<p>Some controls such as transitioning content control may on purpose keep references longer than that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno Martinez</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2410</link>
		<dc:creator>Bruno Martinez</dc:creator>
		<pubDate>Tue, 06 Apr 2010 00:42:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2410</guid>
		<description>Why is detaching events necessary? If nobody keeps a reference to the template part, the garbage collector will get it, along with the delegate back to the control.</description>
		<content:encoded><![CDATA[<p>Why is detaching events necessary? If nobody keeps a reference to the template part, the garbage collector will get it, along with the delegate back to the control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthonywjones</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2391</link>
		<dc:creator>Anthonywjones</dc:creator>
		<pubDate>Sat, 03 Apr 2010 16:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2391</guid>
		<description>@Vish,

Perhaps you should post a question on Stackoverflow with the details and I&#039;ll try to help you out, I see no reason why the approach won&#039;t work with CustomControls, ultimately anything that is being displayed has to be in the Visual Tree somewhere.</description>
		<content:encoded><![CDATA[<p>@Vish,</p>
<p>Perhaps you should post a question on Stackoverflow with the details and I&#8217;ll try to help you out, I see no reason why the approach won&#8217;t work with CustomControls, ultimately anything that is being displayed has to be in the Visual Tree somewhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vish</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2385</link>
		<dc:creator>Vish</dc:creator>
		<pubDate>Sat, 03 Apr 2010 01:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2385</guid>
		<description>Hi Jeff, Anthony,

The VisualTreeHelper seems to work only for UserControls and not on CustomControls...

Thank You,
Vish</description>
		<content:encoded><![CDATA[<p>Hi Jeff, Anthony,</p>
<p>The VisualTreeHelper seems to work only for UserControls and not on CustomControls&#8230;</p>
<p>Thank You,<br />
Vish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthonywjones</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2384</link>
		<dc:creator>Anthonywjones</dc:creator>
		<pubDate>Fri, 02 Apr 2010 22:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2384</guid>
		<description>@Vish,
See an answer of mine on Stackoverflow:-

http://stackoverflow.com/questions/2020842/get-radiobuttons-of-group-in-silverlight-3/2022240#2022240

It contains a useful extension method on DependencyObject that allows a Visual Tree to be queried using LINQ.</description>
		<content:encoded><![CDATA[<p>@Vish,<br />
See an answer of mine on Stackoverflow:-</p>
<p><a href="http://stackoverflow.com/questions/2020842/get-radiobuttons-of-group-in-silverlight-3/2022240#2022240" rel="nofollow">http://stackoverflow.com/questions/2020842/get-radiobuttons-of-group-in-silverlight-3/2022240#2022240</a></p>
<p>It contains a useful extension method on DependencyObject that allows a Visual Tree to be queried using LINQ.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Wilcox</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2382</link>
		<dc:creator>Jeff Wilcox</dc:creator>
		<pubDate>Fri, 02 Apr 2010 20:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2382</guid>
		<description>@Anthonywjones,
No, actually you are correct: DefaultStyleKey probably is the exception... I&#039;m not completely sure though, will think about this.</description>
		<content:encoded><![CDATA[<p>@Anthonywjones,<br />
No, actually you are correct: DefaultStyleKey probably is the exception&#8230; I&#8217;m not completely sure though, will think about this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Wilcox</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2381</link>
		<dc:creator>Jeff Wilcox</dc:creator>
		<pubDate>Fri, 02 Apr 2010 20:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2381</guid>
		<description>@Vish,
You would need to use VisualTreeHelper and some code to do that.</description>
		<content:encoded><![CDATA[<p>@Vish,<br />
You would need to use VisualTreeHelper and some code to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthonywjones</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2380</link>
		<dc:creator>Anthonywjones</dc:creator>
		<pubDate>Fri, 02 Apr 2010 20:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2380</guid>
		<description>Its good to see some explanation for the choices made in the toolkit source code. 

Can you clarify the final statement: &quot;You should define template part attributes on every subclasses where expected. They do not inherit.&quot;

Does that apply even in cases where the DefaultStyleKey remains the type of the base class?</description>
		<content:encoded><![CDATA[<p>Its good to see some explanation for the choices made in the toolkit source code. </p>
<p>Can you clarify the final statement: &#8220;You should define template part attributes on every subclasses where expected. They do not inherit.&#8221;</p>
<p>Does that apply even in cases where the DefaultStyleKey remains the type of the base class?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop &#8211; April 2, 2010 &#124; Alvin Ashcraft&#39;s Morning Dew</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2377</link>
		<dc:creator>Dew Drop &#8211; April 2, 2010 &#124; Alvin Ashcraft&#39;s Morning Dew</dc:creator>
		<pubDate>Fri, 02 Apr 2010 12:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2377</guid>
		<description>[...] Template parts and custom controls (quick tip) (Jeff Wilcox) [...]</description>
		<content:encoded><![CDATA[<p>[...] Template parts and custom controls (quick tip) (Jeff Wilcox) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vish</title>
		<link>http://www.jeff.wilcox.name/2010/04/template-part-tips/comment-page-1/#comment-2376</link>
		<dc:creator>Vish</dc:creator>
		<pubDate>Fri, 02 Apr 2010 11:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/04/template-part-tips/#comment-2376</guid>
		<description>Hi Jeff,

Is it possible to get a reference to the button part inside the custom control being used in the app if I know the name of the part? The GetTemplateChild is protected method, but can an app using the custom control get a reference to the button part?

Thank You,
Vish</description>
		<content:encoded><![CDATA[<p>Hi Jeff,</p>
<p>Is it possible to get a reference to the button part inside the custom control being used in the app if I know the name of the part? The GetTemplateChild is protected method, but can an app using the custom control get a reference to the button part?</p>
<p>Thank You,<br />
Vish</p>
]]></content:encoded>
	</item>
</channel>
</rss>

