<?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>The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx</link><description>My favorite feature of WPF (desktop and web versions) is attached properties. It would be good enough if attached properties merely enabled things like keeping layout properties (Canvas.Left) organized by the type of container rather than the type of</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8466417</link><pubDate>Wed, 07 May 2008 21:14:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466417</guid><dc:creator>Rob</dc:creator><description>&lt;p&gt;Caliburn uses the same pattern to add most of its functionality. &amp;nbsp;It's used to enable MVP, loosely coupled ui composition, ui state persistence, lazy module loading, etc. &amp;nbsp;This would all be possible without attached properties, however it would be much more painful. &amp;nbsp;So, I was very glad when attached properties showed up in the SL 2 Beta 1.&lt;/p&gt;</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8466452</link><pubDate>Wed, 07 May 2008 21:22:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466452</guid><dc:creator>Joe</dc:creator><description>&lt;p&gt;Interesting, would the default control templates in WPF be migrated to this new pattern?&lt;/p&gt;</description></item><item><title>Dog Breeding &amp;raquo; The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8466515</link><pubDate>Wed, 07 May 2008 21:36:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466515</guid><dc:creator>Dog Breeding &amp;raquo; The Attached Behavior pattern</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://dogs-pets.info/dog-breeding/?p=942"&gt;http://dogs-pets.info/dog-breeding/?p=942&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>WPF/Silverlight/XAML Web News - 2008/05/09</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8479603</link><pubDate>Fri, 09 May 2008 14:59:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8479603</guid><dc:creator>Rob Relyea - Xamlified</dc:creator><description>&lt;p&gt;WPF Controls Emphess.Net: A MenuKiller Control - this article is a work in progress detailing how to&lt;/p&gt;
</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8480858</link><pubDate>Fri, 09 May 2008 19:36:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8480858</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;John,&lt;/p&gt;
&lt;p&gt;Thanks for your response on the other post about ICommand and I look forward to seeing your example.&lt;/p&gt;
&lt;p&gt;I do have another question about Behaviors that seems to be an issue with SL that you might be able to provide some background on if you are willing. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the desktop framework, DependencyObject has a .ctor() that is public but in SL, you have to go all the way down the inheritance tree to System.Windows.Controls.Control to find a public .ctor()&lt;/p&gt;
&lt;p&gt;Why is that? &amp;nbsp;I am running into this in using Prism on SL also, not just with behaviors. &amp;nbsp; &lt;/p&gt;
&lt;p&gt;In addition there is a mismatch between the apis for DepenencyProperty.RegisterAttached between desktop and SL that seems to require two different codebases (#if SILVERLIGHT...#else....$endif) which I really don't like. &lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8481030</link><pubDate>Fri, 09 May 2008 20:15:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8481030</guid><dc:creator>JohnGossman</dc:creator><description>&lt;p&gt;Mark,&lt;/p&gt;
&lt;p&gt;In Beta 2 (coming soon), you will find the RegisterAttached API difference has been fixed. &amp;nbsp;We have not made DO.ctor() public on the principal of exposing the least surface area possible, but this has proven problematic. &amp;nbsp;What is the exact scenario you have for wanting your own DO subclass?&lt;/p&gt;
</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8481361</link><pubDate>Fri, 09 May 2008 21:33:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8481361</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;John,&lt;/p&gt;
&lt;p&gt;So far I have run into it twice, three times if you count the Behavior subclass from Nikhil's article. &lt;/p&gt;
&lt;p&gt;1(&amp;amp;2). &amp;nbsp;I was implementing Behaviors myself and was trying to subclass DependencyObject when I ran into your article which linked me to Nikhil's. &amp;nbsp;Like my implementation he was forced to sub-class from Control in SL.&lt;/p&gt;
&lt;p&gt;2. &amp;nbsp;I am doing some spikes involving creating some base classes for use in a MVVP DataModel where the base class for the Data Model objects is a DependencyObject. &amp;nbsp;Now I am not even sure this ia good idea at this point which is why I am asking. :)&lt;/p&gt;
&lt;p&gt;As a more general point I am finding the constrained SL API's somewhat challenging to use not because I can't figure out how to do what I want but because many of the programming idoms that make up the '.NET WAY&amp;quot; have changed and there is no clear commentary on what to replace it with. &amp;nbsp;Case(s) in point:&lt;/p&gt;
&lt;p&gt;* ICommand - pattern is good, Desktop implementation of RoutedEvents is complicated, but no ICommand interface - what now?&lt;/p&gt;
&lt;p&gt;* SerializableAttribute - Replaced with the preferd WCF Serialization which is good but it did take a bit to figure that out. And of course it leave me with incompatible desktop code unless I move everything over to use DataContract. The DLR on SL even duplicates this attribute in its own assembly (Microsoft.Scripting)&lt;/p&gt;
&lt;p&gt;* StringSplitOptions - again missing from SL and duplicated in DLR&lt;/p&gt;
&lt;p&gt;* there are more...&lt;/p&gt;
&lt;p&gt;Please understand I am NOT complaining. &amp;nbsp;Just trying to understand the new SL pattern guidance, which is why I was really glad to find your blog because it appears you are starting to answer some of those questions. &lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8482723</link><pubDate>Sat, 10 May 2008 02:25:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8482723</guid><dc:creator>JohnGossman</dc:creator><description>&lt;p&gt;Great feedback...we're running so fast here we're missing some things. &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8501582</link><pubDate>Tue, 13 May 2008 23:36:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8501582</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;Thanks John.&lt;/p&gt;
&lt;p&gt;I know you are pretty busy but I just ran into another example - in SL the approach taken has to implement the Async Event Pattern as described here, &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/wewwczdw.aspx"&gt;http://msdn.microsoft.com/en-us/library/wewwczdw.aspx&lt;/a&gt; and seen in the WebClient.&lt;/p&gt;
&lt;p&gt;I have implemented code on the desktop to do that but when porting to SL I run into a problem because AsyncOperation and AsyncOperationManager classes don't exist. &amp;nbsp;It appears special versions of them do exist for ClientBase WCF calls but they are not general use and they are internal.&lt;/p&gt;
&lt;p&gt;Again, this is not a matter of asking that these classes be put back but simply trying to figure out what 'pattern' should be used to implement Async API's that are usable on both desktop and SL.&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8501607</link><pubDate>Tue, 13 May 2008 23:43:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8501607</guid><dc:creator>JohnGossman</dc:creator><description>&lt;p&gt;Good question about Async...I will ask the authorities.&lt;/p&gt;
</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8502011</link><pubDate>Wed, 14 May 2008 01:36:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502011</guid><dc:creator>JohnGossman</dc:creator><description>&lt;p&gt;Mark,&lt;/p&gt;
&lt;p&gt;We added AsyncOperation and AsyncOperationManager into SL. &amp;nbsp;They’ll make Beta2. &amp;nbsp;More good news...we are planning to make the ctor for DependencyObject public, though that will not make Beta2.&lt;/p&gt;
</description></item><item><title>re: The Attached Behavior pattern</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8503035</link><pubDate>Wed, 14 May 2008 14:26:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8503035</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;John,&lt;/p&gt;
&lt;p&gt;That is good news! &amp;nbsp;Thanks. &amp;nbsp; &lt;/p&gt;
&lt;p&gt;Any word on ICommand?&lt;/p&gt;</description></item><item><title>VisualStateManager for desktop WPF</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#8844501</link><pubDate>Sat, 09 Aug 2008 01:31:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8844501</guid><dc:creator>Tales from the Smart Client</dc:creator><description>&lt;p&gt;As I’ve described before , we introduced the new VisualStateManager concept into Silverlight WPF before&lt;/p&gt;
</description></item><item><title>Prism V2之旅(4)</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9311925</link><pubDate>Tue, 13 Jan 2009 04:36:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9311925</guid><dc:creator>Clingingboy</dc:creator><description>&lt;p&gt;附加行为(Attach Behavior),像写jQuery插件一样扩展WPF和SilverLight.&lt;/p&gt;
</description></item><item><title>CollectionViewModel</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9413643</link><pubDate>Thu, 12 Feb 2009 02:03:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9413643</guid><dc:creator>David Hill's WebLog</dc:creator><description>&lt;p&gt;In this post, I'm going to describe an implementation of ICollectionView for Silverlight that allows&lt;/p&gt;
</description></item><item><title>MVVM pattern in Silverlight using SLEextensions</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9424581</link><pubDate>Sun, 15 Feb 2009 20:32:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9424581</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;In this article I will explain how to implement MVVM pattern in Silverlight. I was very overjoyed when&lt;/p&gt;
</description></item><item><title>Sometimes all it takes is a little encouragement [How to: Automatically update the widths of ListView columns]</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9425497</link><pubDate>Mon, 16 Feb 2009 11:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9425497</guid><dc:creator>Delay's Blog</dc:creator><description>&lt;p&gt;I was working on a WPF project the other day and wanted an easy way to display data in a simple tabular&lt;/p&gt;
</description></item><item><title>Launching a custom Dialog to edit items in a DataGrid (with MVVM)</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9543273</link><pubDate>Fri, 10 Apr 2009 17:02:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9543273</guid><dc:creator>Vincent Sibal's Blog</dc:creator><description>&lt;p&gt;Launching a custom dialog for editing on the DataGrid is another somewhat common request that I see from&lt;/p&gt;
</description></item><item><title>[WPF] Comment actionner une commande WPF lorsqu’un évènement est déclenché ?</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9548257</link><pubDate>Tue, 14 Apr 2009 12:40:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9548257</guid><dc:creator>Thomas Lebrun</dc:creator><description>&lt;p&gt;Lorsque l’on travaille avec WPF et le pattern MVVM (Model View ViewModel), on essaye d’&amp;#233;viter au maximum&lt;/p&gt;
</description></item><item><title>MVVM &amp; Attached Behavior</title><link>http://blogs.msdn.com/johngossman/archive/2008/05/07/the-attached-behavior-pattern.aspx#9590934</link><pubDate>Wed, 06 May 2009 13:28:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9590934</guid><dc:creator>Vito Arconzo's Blog</dc:creator><description>&lt;p&gt;Uno dei primi “scogli” in cui ci si scaglia contro durante lo studio del Model-View-ViewModel &amp;#232; la visualizzazione&lt;/p&gt;
</description></item></channel></rss>