<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.silverlight.net/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>Dependency Properties or Attached Properties</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx</link><description>Silverlight lets you create a property in an object (such as a rectangle) that derives from an ancestor element (such as a canvas). That is why we can write &amp;lt;Rectangle Canvas.Top=&amp;quot;10&amp;quot; /&amp;gt; Canvas.Top is a property of the Canvas, the ancestor</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>SilverSpud  &amp;raquo; Blog Archive   &amp;raquo; Dependency properties, conceptually explained</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#19214</link><pubDate>Wed, 31 Oct 2007 02:12:58 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:19214</guid><dc:creator>SilverSpud  » Blog Archive   » Dependency properties, conceptually explained</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;SilverSpud &amp;nbsp;&amp;amp;raquo; Blog Archive &amp;nbsp; &amp;amp;raquo; Dependency properties, conceptually explained&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=19214" width="1" height="1"&gt;</description></item><item><title>re: Dependency Properties or Attached Properties</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#15173</link><pubDate>Sun, 23 Sep 2007 16:14:19 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:15173</guid><dc:creator>Ian Griffiths</dc:creator><description>&lt;p&gt;...in fact it turns out to me more complex than I thought, as I discovered since I wrote the previous reply.&lt;/p&gt;
&lt;p&gt;It is possible for a property to declare that it's only supposed to be applicable to child elements. If the Get accessor has the AttachedPropertyBrowsableForChildrenAttribute applied, it's declaring that it's only meaningful when applied to children of the defining type.&lt;/p&gt;
&lt;p&gt;Not that anything enforces this right now. Indeed, it's only intended as a design-time hint for where the property should be suggested.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=15173" width="1" height="1"&gt;</description></item><item><title>Silverlight Cream for September 21, 2007</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#15018</link><pubDate>Fri, 21 Sep 2007 18:40:03 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:15018</guid><dc:creator>WynApse</dc:creator><description>&lt;p&gt;Silverlight Cream for September 21, 2007&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=15018" width="1" height="1"&gt;</description></item><item><title>re: Dependency Properties or Attached Properties</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#14859</link><pubDate>Thu, 20 Sep 2007 12:24:29 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:14859</guid><dc:creator>jesseliberty</dc:creator><description>&lt;p&gt;Ian,&lt;/p&gt;
&lt;p&gt;Thank you for the very thoughtful analysis.&lt;/p&gt;
&lt;p&gt;The use of the term &amp;quot;derivation&amp;quot; was too casual; the term has a specific meaning and I should have chosen a different word.&lt;/p&gt;
&lt;p&gt;It is valuable, however, to have the second blog entry corrected; I frankly didn't know that about WPF, and I appreciate your taking the time to sort that out.&lt;/p&gt;
&lt;p&gt;-jesse&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=14859" width="1" height="1"&gt;</description></item><item><title>re: Dependency Properties or Attached Properties</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#14855</link><pubDate>Thu, 20 Sep 2007 11:08:16 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:14855</guid><dc:creator>Ian Griffiths</dc:creator><description>&lt;p&gt;A couple of points:&lt;/p&gt;
&lt;p&gt;Attached properties in XAML in general have nothing to do with either derivation or containment. So when you say that you can have property&lt;/p&gt;
&lt;p&gt;&amp;quot;that derives from an ancestor element (such as a canvas)&amp;quot;&lt;/p&gt;
&lt;p&gt;that's not really what's going on from the XAML perspective. It so happens that in the Silverlight XAML vocabulary all the attached properties happen to be defined by ancestor elements, but that's just a coincidence. It's not a feature of attached properties in general, it just happens to be a feature of the small set of attached properties Silverlight happens to support.&lt;/p&gt;
&lt;p&gt;If you look at the WPF XAML vocabulary, it includes all the attached properties supported by Silverlight, but it also includes a load more. For example, there's the FocusManager.FocusedElement attached property. You'll never see anything be the descendent of a FocusManager, because FocusManager is a static class - you can't create one so it can't be the ancestor of anything in a visual tree. And yet you can set the FocusManager.FocusedElement on elements in a WPF visual tree.&lt;/p&gt;
&lt;p&gt;(So Josh's description is wrong I'm afraid. He's talking about WPF, which has several attached properties that don't match his description.)&lt;/p&gt;
&lt;p&gt;So attached properties have nothing to do with containment. An attached property is simply one that can be applied to an element of a different type than the type that defines the property. So Canvas defines a Left property, but allows that property to be applied to other things such as Rectangle. And when Canvas's Left property is applied to a non-Canvas element such as Rectangle, we call that an attached property.&lt;/p&gt;
&lt;p&gt;The attached properties defined by Canvas only mean anything useful when they are attached to the children of a Canvas. However, in WPF, you're free to attach them to anything you like. They are simply ignored if you use them anywhere other than on the children of a Canvas.&lt;/p&gt;
&lt;p&gt;And derivation doesn't come into the picture at all. I'm not sure why you mentioned that.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=14855" width="1" height="1"&gt;</description></item><item><title>Silverlight Cream for September 19, 2007</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#14772</link><pubDate>Wed, 19 Sep 2007 16:26:21 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:14772</guid><dc:creator>WynApse</dc:creator><description>&lt;p&gt;Silverlight Cream for September 19, 2007&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=14772" width="1" height="1"&gt;</description></item><item><title>Dependency Properties or Attached Properties</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#14743</link><pubDate>Wed, 19 Sep 2007 14:28:57 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:14743</guid><dc:creator>Test</dc:creator><description>&lt;p&gt;Silverlight lets you create a property in an object (such as a rectangle) that derives from an ancestor&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=14743" width="1" height="1"&gt;</description></item><item><title>Dependency Properties or Attached Properties - Jesse Liberty - Silverlight Geek</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/09/19/dependency-properties-or-attached-properties.aspx#14735</link><pubDate>Wed, 19 Sep 2007 13:49:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:14735</guid><dc:creator>Dependency Properties or Attached Properties - Jesse Liberty - Silverlight Geek</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Dependency Properties or Attached Properties - Jesse Liberty - Silverlight Geek&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=14735" width="1" height="1"&gt;</description></item></channel></rss>