Wrox Programmer Forums
|
Silverlight 1.0 and 1.1 Discuss Microsoft Silverlight. Please state whether your issue is 1.0 or 1.1 if that isn't clear from the post itself.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Silverlight 1.0 and 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2008, 08:39 AM
Authorized User
 
Join Date: Aug 2006
Posts: 41
Thanks: 1
Thanked 0 Times in 0 Posts
Default Silverlight controls

Hi all,
I need some advice on Silverlight User Controls in VS2008 please.

I've created a new silverlight application in VS2008 and added a new web project to the solution to run the silverlight controls in web pages.

It creates a default silverlight control which I've added some basic functionality to, i.e. a button and click event, etc, and it all works fine.

This all builds and runs perfectly well in the test aspx page from within the web project attached to the solution.

What I've noticed is that the silverlight application references the control within the app.xaml file on the application_startup method which I assume instantaites the control for the project.

My main question is, can you only run one silverlight control per silverlight project? And what if you want to reference another silverlight control within your web project?

I can add a new control within the silverlight project, but I cannot instantiate that control unless it's first in the app.xaml's application_startup method, which means I can only reference one silverlight control in the project.

Also, on the aspx page within the silverlight control, the "source" property just references the silverlight application as a whole in the clientbin.

So my main question is, do you create only one silverlight control per project and then build seperate projects for each different control you want? Because you can't seem to reference more than one control with a silverlight project.
Thanks in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Silverlight 1.0SDk ilegend .NET Framework 3.5 0 October 4th, 2008 07:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.