Simulation de MasterPage sous Xbap

Lors de la mise en place d'un site ASP.NET, nous avons l'habitude d'utiliser des masterPage, mais qu'en est-il pour le WPF sous Xbap?

Bien que nous n'y pensions pas dés les premier instant, il existe un moyen simple de s'en sortir : les frames.

Voici un exemple de "master page" xaml pour Xbap :

 

<Page x:Class="MiniMixClient.MasterPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MasterPage" Width="800" Height="600">
    <StackPanel>
        <TextBlock  FontSize="40" Foreground="LightCyan">Titre de la page</TextBlock>


         <Frame    Width="800" Height="560"
                Source="InnerPage.xaml"/>


    </StackPanel>
</Page>
[/code]

Et voilà le travail, notez maintenant qu'une navigation entre plusieurs page dans la Frame est possible, voir Naviger entre plusieur page sous Xbap.

Posted on 05/11/2007 12:35:00 by Togis

Permalink | Commentaires (0) | Post RSSRSS comment feed |

Categories: WPF | Tips | Xbap

Tags:

Actuellement noté 2.3 par 3 personne(s)

  • Currently 2,333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Billets liés

Ajouter un commentaire


(Affichera votre icône Gravatar)  

  Country flag





Live preview

août 20. 2008 16:00