Skip to main content
Home Forums General Silverlight Getting Started in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this
8 replies. Latest Post by SLMonster on July 5, 2009.
(0)
pinks123
Member
24 points
32 Posts
06-29-2009 6:23 AM |
in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this
Krasshirsch
Participant
1029 points
295 Posts
06-29-2009 6:47 AM |
You need to add the Usercontrol to the Visualtree.
Every UserControl has a property children,
Create an instance of your new page.xaml and add it to the Children of another, or directly to the ApplicationRoot.
jay nana...
Contributor
3388 points
624 Posts
06-29-2009 6:50 AM |
Hi,
for that, in your App.xaml.cs, in Application_Startup event, set the page like this:
this.RootVisual = new YourPage();
06-29-2009 7:52 AM |
i did lik this.But still i am nt getng tht page in running.
brightstar
406 points
184 Posts
06-29-2009 8:15 AM |
Maybe because at App.xaml.cs
private void OnStartup(object sender, StartupEventArgs e) { // Load the main control here this.RootVisual = new MainControl(); }
It's still this, not <your_name>.xaml?
If your want to load oleg1.xaml for example, use:
this.RootVisual = new oleg1();
06-29-2009 8:45 AM |
No .i have used ..
{
}
where Ellipse is my new page.
Shall i have to make startup page of silverlightappl.
Amanda W...
All-Star
17234 points
1,466 Posts
07-02-2009 5:56 AM |
Did you host your silverlight application in the website? If yes, you can try to set the start page of your website.
teju_bg
4 points
3 Posts
07-03-2009 12:51 AM |
U cannot add another page.xaml...But u can add Canvas to it..If u want to run that particular xaml, tak out the other xaml code...
SLMonster
287 points
64 Posts
07-05-2009 11:31 PM |
I have seen sometimes that you do some change in Silvelight project and then run the projects, and it doesn't show your modifications. one of the following may resolve your issue,
1. Ensure that you have not skipped (Unchecked) the silverlight project from the configurationManager.2. Clear browser cache.
this solves my problem.
--CheersMahesh