Page view counter
ContentPropertyAttribute in Silverlight?
Last post 05-11-2007 4:48 PM by bryant. 3 replies.
Sort Posts:
05-08-2007 3:50 PM
ContentPropertyAttribute in Silverlight?

is there an equivalent for WPF ContentPropertyAttribute in Silverlight clr?

I mean I'm creating some custom control. the control contains a custom children collection. I want the xaml reader to add xaml children to that collection. so instead of

<control> 

<control.children>

<child1 /> 

<child2 />

<child3 />

<control.children>

</control>

 

I want to be able to write  

 

 

<control> 

<child1 /> 

<child2 />

<child3 />

</control>

 

psih128

Loading...
Joined on 05-08-2007
Posts 6
05-08-2007 8:27 PM
Re: ContentPropertyAttribute in Silverlight?
We do not support [edit] custom content properties in the current 1.1 Alpha release. We are looking at how best to expose later.

-mark
Program Manager
Microsoft
This post is provided "as-is"


Mark Rideout

Loading...
Joined on 01-03-2006
Redmond, WA
Posts 266
05-11-2007 3:30 PM
Re: ContentPropertyAttribute in Silverlight?

 Hm.... Im wondering then how does XamlReader know that it should add <Canvas>'s xaml tag children to Canvas.Children collection?

psih128

Loading...
Joined on 05-08-2007
Posts 6
05-11-2007 4:48 PM
Re: ContentPropertyAttribute in Silverlight?

The restriction only applies to custom controls, not to Silverlight native objects.

-- bryant

___________________

Dont forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.

bryant

Loading...
Joined on 10-23-2002
Simi Valley, CA
Posts 104
Microsoft Communities