Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Multiple XAML inside one XAML file in Silverlight 3 RSS

8 replies

Last post Jun 02, 2010 09:52 AM by dvinodeluru_Multimeida

(0)
  • madvik

    madvik

    Member

    1 Points

    5 Posts

    Multiple XAML inside one XAML file in Silverlight 3

    Jul 02, 2009 11:19 AM | LINK

    Can any body help on navigation control of Silverlight 3 ?

    I would like to design my Home.xaml constructed from 3 diffrent xaml page

    Header.xaml,left.xaml,content.xaml, footer.xaml

    -------------------------------------------------------------------|

                     Header.xaml                                |

    -------------------------------------------------------------------|

    left.xaml   |            content.xaml                    |

    -------------------------------------------------------------------|

                  footer.xaml

    ------------------------------------------------------------------|

     

    Regards

    Madvik

     

     

    -------------------------------------------------------------------|

    XAML

  • jay nanavati

    jay nanavati

    Contributor

    3517 Points

    668 Posts

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 02, 2009 11:31 AM | LINK

    you can use frame for content.xaml area. and for left.xaml, I think it is navigation menu, for that use navigation framework. and for header and footer, create separate user control and use them in MainPage.xaml. you can use 3 row by 2 column Grid in MainPage.xaml and for header and footer, set columnspan 2.

    so xaml would be like this:

    <Grid>

    //assume it 3*2 grid

    <mySite:Header columnspan="2">

    <navigation Grid.Row="1">

    <mySite:Footer  Grid.Row="2" columnspan="2">

    </Grid>

  • AustinLamb

    AustinLamb

    Member

    602 Points

    104 Posts

    Microsoft

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 02, 2009 04:51 PM | LINK

    Jay's solution seems correct to me as well, providing that "left" and "content" are both meant to be areas that have content changing often.  If only "content" will change often, that's probably the only one that needs to be a Frame.

    One note - if you use multiple Frames, you should decide which one will be browser-integrated (if any of them).  For any Frames that are not browser-integrated, be sure to set JournalOwnership="OwnsJournal" on that Frame.  This way the browser's back/forward button only interact with one Frame, which is usually the intended user experience.

  • steveli

    steveli

    Member

    213 Points

    19 Posts

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 02, 2009 06:35 PM | LINK

    I would recommend using ContentControl for each part and place all parts inside appropriate layout, e.g. use Grid, StackPanels, etc.

    And when your page is loaded insert custom UserControl to the appropriate ContentControl.

    Steve Li,
    Cellbi Software
    www.cellbi.com
  • madvik

    madvik

    Member

    1 Points

    5 Posts

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 08, 2009 03:14 AM | LINK

    I used navigation control....

    <StackPanel x:Name="LayoutRoot" Orientation="Vertical" Background="White">

    <navigation:Frame x:Name="Header" Content="Header" JournalOwnership="OwnsJournal" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"

    Width="1200" Height="75" Source="/Header.xaml" Background="Bisque"/>

    <StackPanel Orientation="Horizontal">

    <navigation:Frame x:Name="Navigator" Content="Navigator" JournalOwnership="OwnsJournal" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"

    Width="150" Height="450" Source="/Navigator.xaml" Background="Aqua"/>

    <navigation:Frame x:Name="Content" Content="Content" JournalOwnership="OwnsJournal" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"

    Width="1050" Height="450" Source="/Content.xaml" Background="LightGray"/>

    </StackPanel>

    </StackPanel>

  • AustinLamb

    AustinLamb

    Member

    602 Points

    104 Posts

    Microsoft

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 08, 2009 07:14 PM | LINK

    So I gather that you don't want browser-integration (deeplinking, back/forward buttons, etc.) as you set JournalOwnership="OwnsJournal" on each Frame?

    Looks like that should get you where you want to go - let me know if you have any other questions.

  • madvik

    madvik

    Member

    1 Points

    5 Posts

    Re: Re: Multiple XAML inside one XAML file in Silverlight 3

    Jul 09, 2009 06:38 AM | LINK

    Yes.....thx for ur help

  • ashoknuthaki

    ashoknuthaki

    Member

    56 Points

    28 Posts

    Re: Multiple XAML inside one XAML file in Silverlight 3

    Jan 21, 2010 09:47 AM | LINK

    I am having the sam erequirement. Can you please give me the full code or Application to download.

    My Requirement is as above one but -

    I want a layout with -
    1. Header.
    2. Left Navigation (Collapsible Menu)
    3. Content Page. (It should change as per the click on Collapsible Menu item).
    4. Footer (with Current Content Page Name).
    5. One Full Screen Button.
    Can you please send me the above functionality ASAP. I have an urgent requirement. All should be in Silverlight Application only.

    |---------------------------------------------------------------|
    |            Header.xaml                                 |
    |---------------------------------------------------------------|
    |                      |                                        |
    |left.xaml          |            content.xaml         |
    |                      |                                        |
    |Full Screen Btn|                                        |
    |---------------------------------------------------------------|
    |              footer.xaml                                 |
    |---------------------------------------------------------------|

    - Ashok N.
  • dvinodeluru_Multimeida

    dvinodeluru_...

    Member

    8 Points

    7 Posts

    Re: Re: Multiple XAML inside one XAML file in Silverlight 3

    Jun 02, 2010 09:52 AM | LINK

     Hi,

    I am designer and I am looking for similar but with animation part , I have different pages and want to navigate each page with a transaction like sliding to next page or fade in fade out kind of effects. I found a site but that not working for me. http://joel.neubeck.net/2009/08/navigation-transitions-with-writeablebitmap/ hitting errors Iam using Blend 4 and Silverlight 4 i think this is in WPF,

    can i have your solution sample,


    Some one can help on animation how to do so and navigate pages.

     thanks

    vinod