<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx</link><description>I like to think of the technique I am about to demonstrate as the Ramora pattern - it allows you to attach a chunk of logic to any existing element that you have. The RadialPanel example showed an example of storing information on an element using attached</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#6014199</link><pubDate>Fri, 09 Nov 2007 14:32:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6014199</guid><dc:creator>Alfred</dc:creator><description>&lt;P&gt;Hi Bencon,&lt;/P&gt;
&lt;P&gt;did you tryed to let your software work on MS Visual Studio 2008 Version 9.0.20706.1 Beta2.&lt;/P&gt;
&lt;P&gt;It seems that your software isn't able to compile, I've following errors:&lt;/P&gt;
&lt;P&gt;Error 1 Assembly 'AttachedBehaviorExample' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project. C:\Documents and Settings\aso\Desktop\AttachedBehaviorExample\Window1.xaml 4 17 AttachedBehaviorExample&lt;/P&gt;
&lt;P&gt;Error 2 The attachable property 'Brush' was not found in type 'Hover'. C:\Documents and Settings\aso\Desktop\AttachedBehaviorExample\Window1.xaml 8 32 AttachedBehaviorExample&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;Did you experienced it? Have you any idea how to solve the trouble?&lt;/P&gt;
&lt;P&gt;Thank you very much in advance for your attention,&lt;/P&gt;
&lt;P&gt;Alfred&lt;/P&gt;</description></item><item><title>Attached Properties spreadsheet &amp;laquo; Martin&amp;#8217;s 10</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#6266407</link><pubDate>Thu, 15 Nov 2007 19:24:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6266407</guid><dc:creator>Attached Properties spreadsheet « Martin’s 10</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://wangmo.wordpress.com/2007/11/15/attached-properties-spreadsheet/"&gt;http://wangmo.wordpress.com/2007/11/15/attached-properties-spreadsheet/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#8333998</link><pubDate>Mon, 24 Mar 2008 21:31:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8333998</guid><dc:creator>duncan</dc:creator><description>&lt;P&gt;This looks like a very interesting technique, but how do you prevent memory leaks from the event handlers when the control goes out of scope?&lt;/P&gt;</description></item><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#8732458</link><pubDate>Tue, 15 Jul 2008 04:21:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8732458</guid><dc:creator>BenCon</dc:creator><description>&lt;p&gt;duncan - &lt;/p&gt;
&lt;p&gt;You can unsubscribe from the events when the control is unloaded if that is an issue. I normally leave these details out of these kinds of examples, because it complicates the example and makes it harder to learn the key concept at hand.&lt;/p&gt;
</description></item><item><title>Remora Pattern by Ben Constable</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#9506566</link><pubDate>Wed, 25 Mar 2009 09:09:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9506566</guid><dc:creator>Razan's blog</dc:creator><description>&lt;p&gt;According to Ben Constable, Remora Pattern allows you to attach a chunk of logic to any existing element&lt;/p&gt;
</description></item><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#9907059</link><pubDate>Wed, 14 Oct 2009 09:17:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907059</guid><dc:creator>Kaj</dc:creator><description>&lt;P&gt;Great work! &lt;/P&gt;
&lt;P&gt;However I need to set this kind of properties from the code-behind instead of in the XAML Any ideas?&lt;/P&gt;
&lt;P&gt;I would like to do this from the code:&lt;/P&gt;
&lt;P&gt;&amp;lt;Button Content="Button 1" local:Hover.Brush="Red" /&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can do this by using the SetBrush static method on the Hover class, and passing the instance of the Button as the first argument.&lt;/EM&gt;&lt;/P&gt;</description></item><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#9922847</link><pubDate>Mon, 16 Nov 2009 08:24:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922847</guid><dc:creator>lol-presentation</dc:creator><description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;"You can unsubscribe from the events when the control is unloaded if that is an issue."&lt;/P&gt;
&lt;P&gt;If you do that with a control that is reparented (like controls in a tab item), your behaviour will stop working after the first reparenting.&lt;/P&gt;
&lt;P&gt;How do you work around that?&lt;/P&gt;</description></item><item><title>re: More advanced attached property use: the Ramora pattern</title><link>http://blogs.msdn.com/bencon/archive/2006/07/26/more-advanced-attached-property-use-the-ramora-pattern.aspx#9923318</link><pubDate>Tue, 17 Nov 2009 01:39:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923318</guid><dc:creator>BenCon</dc:creator><description>&lt;p&gt;When the control is reparented, you should get an unloaded event and a loaded event. You can unwire in unloaded and rewire in loaded.&lt;/p&gt;
</description></item></channel></rss>