set as start page: Silverlight XAML

I really miss the option “set as start page” in Visual Studio Explorer for Silverlight Projects. If I have time in the next days (;-))Ii will write visual studio extension for that purpose.

In fact it is not complicated. The app.xaml have a codebehind file ( app.xaml.vb or app.xaml.cs) which create a instance of the visible XAML. Btw that is the reason for changing xaml to usercontrol in B2.

All you have to to, to change the start page is to change one line of code in startup. Instead of page write the name of the class you want to show.

Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
        Me.RootVisual = New secondXAML()
End Sub
Published Thursday, July 31, 2008 10:54 AM by preishuber
Filed under: ,

Comments

# re: set as start page: Silverlight XAML

Thursday, July 31, 2008 6:23 AM by MasterMoez

Yeah that's right, but you should know that a Sliverlight project runs under an ASP.NET Projet, so the "The set as start page your are looking for exists in the ASP.NET project".

What I cant digest in silverlight is that the fact of creating a silverlight user control library, we can't only run/show the main silverlight user control that defined in the App.xaml code behind file, so each time I want to change the user control, I set it in the App.xaml.cs file, buil my silverlight project, it's automatically delployed in my ASP.NET application, then go change the name of my zap file, then redeployed againg.

At the end, I had too much zap files as much as my user controls.

So what I'm thinking of deploying here is to buil an ASP.NET Xaml Server Control that will inherit from the base Xaml Server Control, plus where I can define the class/server control of choice, in this case we can manage one zap file for multiple server control.

I hope that this will be implemented in the final release of Silverlight, I can understand it is still in beta

Moez Tounsi

Business Framework Team Leader

# set as start page: Silverlight XAML

Thursday, July 31, 2008 7:30 AM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# Post: 157

Friday, August 01, 2008 4:52 AM by Mirrored Blogs

Post: Approved at: Aug-1-2008 One Perspective on Silverlight Matt Davey writes about his impression of

Leave a Comment

(required) 
(required) 
(optional)
(required)