Skip to main content

Microsoft Silverlight

Answered Question call multiple xaml in a pageRSS Feed

(0)

purushotham216@gmail.com
purushot...

Member

Member

0 points

9 Posts

call multiple xaml in a page

Hi to all,Thanks in advance,

 

      How to call multiple xaml (in one project ) in a page?

preishuber
preishuber

Contributor

Contributor

3570 points

655 Posts

Answered Question

Re: call multiple xaml in a page

each xaml page is a usercontrol

create a instance and add it to Child collection

(like in app.xaml.cs is done)

-Hannes

http://www.preishuber.net http://weblogs.asp.net/hpreishuber

purushotham216@gmail.com
purushot...

Member

Member

0 points

9 Posts

Re: call multiple xaml in a page

 Thanks for u r reply,

 I am new to silver light.please give  me any sample of above requirement.

  

RWyman
RWyman

Member

Member

16 points

13 Posts

Answered Question

Re: call multiple xaml in a page

What are you tring to do with the xaml pages you are calling?  I am relatively new to Silverlight as well, so I only know a couple of ways to do this.  But if you are trying to create a popup you could do something like:
MyPopup.Child = new MySecondXamlPage();
MyPopup.IsOpen = true;

Or you could load a new xaml page into a ContentControl by doing something like:
MyContentControl.Content = new MySecondXamlPage();

Or if you are using Silverlight 3.0 you could use a naviagation frame.  I don't have any experience with this, so I cannot give you an example of how to use this.

http://silverlight.net/learn/learnvideo.aspx?video=56933 also shows how to change xaml pages.

 Basically if you want to load a xaml page into an exsiting one you just need to create a new instance of it and store it in something, such as the child element of a popup or the content element of a content control.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities