Programming with .NET - Generalhttp://forums.silverlight.net//17.aspx/1?Programming+with+NET+GeneralGeneral discussions around authoring Silverlight .NET applications.Mon, 01 Jan 0001 00:00:00 -050017106030http://forums.silverlight.net//p/35358/106030.aspx/1?Custom+dependency+property+inheritanceCustom dependency property inheritance <p>Hi All,</p> <p>&nbsp;I have a user control which defines a number of dependency properties. How do I configure it so that if I add a child user Control to its canvas that theses custom dependency properties are inherited?</p> <p>&nbsp;Thanks,</p> <p>Colin E. <br> </p> 2008-10-10T09:33:13-04:00106953http://forums.silverlight.net//p/35358/106953.aspx/1?Re+Custom+dependency+property+inheritanceRe: Custom dependency property inheritance <p>I'm not sure exactly what you need, but we don't allow custom DP inheritance. You'd have to implement your own inheritance mechanism (ugh).</p> <p>Something about your scenaio seems like it is more complicated than it needs to be, but I'd need more details to understand.</p> 2008-10-12T15:26:24-04:00107029http://forums.silverlight.net//p/35358/107029.aspx/1?Re+Custom+dependency+property+inheritanceRe: Custom dependency property inheritance <p>ColinE, </p> <p>Do you really mean <u>inheritance</u>, or are you talking about <em>attached</em> properties, like &quot;Canvas.Top&quot; ?</p> 2008-10-12T19:52:40-04:00108330http://forums.silverlight.net//p/35358/108330.aspx/1?Re+Custom+dependency+property+inheritanceRe: Custom dependency property inheritance <p>&nbsp;Yep - it really is inheritance that I am after, I have been re-implementing a WPF pie chart I wrote within Silverlight:</p> <p>http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx </p> <p>One of the features of WPF I like is that you can nest User Controls, for example, offering a pie, or a pie combined with a legend. DP inheritence allows the nested control to inherit properties.</p> <p>This is not the same as attached properties :-(</p> <p>&nbsp;Thanks for your feedback - looks like I will have to do what i used to do in WinForms, provide property wrappers.</p> <p>Regards,</p> <p>Colin E. <br> </p> <p>&nbsp;</p> 2008-10-14T08:03:03-04:00