MichaelD!

I have a scene that has two objects that are very similar. Each object has 6 child objects. I'd like to encapsulate each object into its own control and have two controls in my scene instead of 14 (2 parents + 12children) total. Is there a way to do this

I've looked at the Silverlight reference and didn't see anything like this... apologies if it exists!

Thanks!




Re: Silverlight (formerly WPF/E) Developer Issues Defining UserControls?

Chad Campbell

Hi Mike,

Silverlight itself does not have "user controls". However, there are several options:

1. Define multiple agHost elements and use the same .xaml file

2. Create an ASP.NET user control that houses Silverlight content. I have created one of these and it is available here: http://cornucopia30.blogspot.com/2007/01/wpfe-basic-wpfe-user-control.html

If this answers your question, please select "Mark as Answer", otherwise, please post a followup question.

Thank you,

Chad Campbell






Re: Silverlight (formerly WPF/E) Developer Issues Defining UserControls?

Mike-EEE

Wow.

Well that certain is a rather inventive and creative way of going about it. Smile I can't believe there aren't any built-in encapsulation strategies!

Looks like Silverlight was meant to be a glorified media player at this point... Hopefully the near future will upgrade much of this.

I'm interested in what you mean by the first suggestion. Any examples