Skip to main content

Microsoft Silverlight

Answered Question in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do thisRSS Feed

(0)

pinks123
pinks123

Member

Member

24 points

32 Posts

in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

Krasshirsch
Krasshirsch

Participant

Participant

1042 points

300 Posts

Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

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.

A Bro must always post bail for another Bro, unless it's out of state or, like, crazy expensive.

Crazy Expensive Bail > (Years You've been Bros) * $100

Alexander Wieser
Germany

jay nanavati
jay nana...

Contributor

Contributor

3388 points

624 Posts

Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

Hi,

for that, in your App.xaml.cs, in Application_Startup event, set the page like this:

            this.RootVisual = new YourPage();
 

Jay K Nanavaty
www.technologyopinion.com
Mark as answer if it helps. It will also help others...

pinks123
pinks123

Member

Member

24 points

32 Posts

Re: Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

i did lik this.But still i am nt getng tht page in running.

brightstar
brightstar

Member

Member

406 points

184 Posts

Re: Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

 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();

 

pinks123
pinks123

Member

Member

24 points

32 Posts

Re: Re: Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

No .i have used ..

private void Application_Startup(object sender, StartupEventArgs e)

{

this.RootVisual = new Ellipse();

}

where Ellipse is my new page.

Shall i have to make startup page of silverlightappl.

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Re: Re: Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

 Hi,

Did you host your silverlight application in the website? If yes, you can try to set the start page of your website.

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

teju_bg
teju_bg

Member

Member

4 points

3 Posts

Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

Hi,

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
SLMonster

Member

Member

299 points

65 Posts

Answered Question

Re: Re: Re: in my silverlight application,i add another page.xaml..suppose i wana run tht particular xaml.How wil i do this

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.

--Cheers
Mahesh

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities