Bonjour
C'est encore moi
J'ai un petit problème : je créé une application dans laquelle j'aimerais utiliser le PanoramaPage. Le problème c'est que dans chaque PanoramaItem, je dois placer des contrôles (sinon ça n'a aucun interêt ^^). Je me suis donc dit "Je vais mettre un ContentPanel dans lequel je mettrai mes contrôles". Tout va bien jusque là. J'ai mis un bouton dedans mais le problème c'est que maintenant il est collé au milieu du ContentPanel et impossible de l'aligner en haut à droite comme j'aimerais le faire
C'est tout simple, j'en suis sûr, mais je débute... alors je fais appel à votre savoir !
Voici mon code :
et voici une capture d'écran du design (j'ai tout sélectionné pour vous montrer, et les trucs sont bien imbriqués normalement) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 <phone:PhoneApplicationPage x:Class="PhoneApp6.PanoramaPage1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="False"> <!--LayoutRoot contient la grille racine où tout le contenu des autres pages est placé--> <Grid x:Name="LayoutRoot"> <phone:Panorama Title="ajouter note" Loaded="Panorama_Loaded_1"> <!--Élément un de panorama--> <phone:PanoramaItem x:Name="General" Header="général"> <ContentControl x:Name="ContenuGeneral" HorizontalAlignment="Left" Height="483" VerticalAlignment="Top" Width="420"> <Button Content="Button" Name="Bonjour"/> </ContentControl> </phone:PanoramaItem> <!--Élément deux de panorama--> <phone:PanoramaItem Header="position"> <Grid/> </phone:PanoramaItem> <TextBlock HorizontalAlignment="Left" Height="571" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="420"/> </phone:Panorama> </Grid> </phone:PhoneApplicationPage>
Merci !
Partager