views:

19

answers:

2

Hey,

I'm developing a Silverlight application for the first time. I've gone through some tutorials, but I can't seem to find anything that helps me with this particular problem. I would like a set of buttons to be present on all of my pages (like a template). When a button is pressed, I would like the ContentGrid to slide out and a new ContentGrid slide in (with the relevant .xaml file being loaded). Are there any tutorials showing the best way to do this? From samples I've seen, they only seem to transition between two pages, so copy-pasting the group of buttons on each xaml page isn't too much of a problem. However, with more pages, it would be inefficient to copy-paste the base layout each time.

Thanks for any suggestions

A: 

Have you tried the Silverlight Business Application Visual Studio Project template?

Sander Pham
Hi. I tried installing it a couple of times, but I kept getting a "No instance" error when I tried to open it. Not sure what the problem is, but I'll create a user control for this particular problem. Thanks.
SSL
+1  A: 

Hey,

I used to create a master view and create each page content as a user control; that way, I can swap out/in the user control for the appropriate page, and I would have a consistent header that way... similar to a master page in ASP.NET. I'm sure there are other templates too; I'm not aware of everything available for Silverlight...

The one answer I cannot provide is the transition; the only thing I can offer is Telerik has a control for that purpose, the transition control: http://demos.telerik.com/silverlight/#Controls I understand if you can't drop a couple of hundred bucks to get it though :-)

HTH.

Brian
Thanks for the help! I like the approach of creating a user control and calling that from the code. As for the transitions, I'm sure it will be a bit easier to play with the storyboard functions now that I know that a user control is the way to go.
SSL