Walter Fabio Simoni
Walter Fabio Simoni

Reputation: 5729

Application Panorama doesn't move my controls

I have create a little application Panorama for Windows Phone. I have inserted several controls.

When i run my apps, when i slide on the second Panorama Item, the programme goes on the second item, but my controls are always on.

I think that my controls aren't "on" my first Panorama Item.

Here is y XAML code

`

<!--LayoutRoot est la grille racine où tout le contenu de la page est placé-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <!--Contrôle Panorama-->
    <controls:Panorama Title="Data arbitror" Background="{x:Null}" Margin="0,15,0,-15" Grid.ColumnSpan="2">
        <!--Élément un de panorama-->
        <controls:Panorama.TitleTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontSize="85" Margin="0,50,0,0" />
            </DataTemplate>
        </controls:Panorama.TitleTemplate>

        <controls:PanoramaItem Header="Paramètres" HeaderTemplate="{StaticResource MyPanoramaHeaderTemplate}">

            <!--Liste double trait avec habillage du texte-->
        </controls:PanoramaItem>

        <!--Élément deux de panorama-->
        <!--Utilisez 'Orientation="Horizontal"' pour activer un panneau qui s'affiche horizontalement-->
        <controls:PanoramaItem Header="A propos" HeaderTemplate="{StaticResource MyPanoramaHeaderTemplate}">
            <!--Liste double trait avec espace réservé pour une image et habillage du texte-->
        </controls:PanoramaItem>
    </controls:Panorama>
    <TextBlock Height="43" HorizontalAlignment="Left" Margin="22,276,0,0" Name="textBlock1" Text="Désactiver les connexions de données entre" VerticalAlignment="Top" Width="401" Grid.ColumnSpan="2" FontFamily="{StaticResource PhoneFontFamilyNormal}" />

    <toolkit:TimePicker HorizontalAlignment="Left" Margin="46,325,0,0" Name="TimeBegin" VerticalAlignment="Top" />
    <toolkit:TimePicker HorizontalAlignment="Left" Margin="46,429,0,0" Name="TimeEnd" VerticalAlignment="Top" />
    <TextBlock Height="30" HorizontalAlignment="Left" Margin="90,396,0,0" Name="textBlock2" Text="et" VerticalAlignment="Top" />
    <TextBlock Height="43" HorizontalAlignment="Left" Margin="22,547,0,0" Name="textBlock3" Text="Désactiver les connexions de données après" VerticalAlignment="Top" Width="401" Grid.ColumnSpan="2" />
    <TextBox Height="72" HorizontalAlignment="Left" Margin="46,0,0,130" Name="textBoxMinutes" Text="1" VerticalAlignment="Bottom" Width="101" />
    <TextBlock Height="43" HorizontalAlignment="Left" Margin="155,615,0,0" Name="textBlock4" Text="minutes d'innactivitée" VerticalAlignment="Top" Width="401" Grid.ColumnSpan="2" />

    <toolkit:ToggleSwitch Margin="232,371,21,0" Header="Etat" Name="toggleSwitch1" VerticalAlignment="Top" Height="124" Width="227" SwitchForeground="#78BC27" />
    <toolkit:ToggleSwitch Height="124" Header="Etat" Margin="232,0,21,12" Name="toggleSwitch2" VerticalAlignment="Bottom" Width="227" SwitchForeground="#78BC27" />
</Grid>

`

Upvotes: 0

Views: 133

Answers (1)

ctacke
ctacke

Reputation: 67178

Looking at the schema you've posted, it shows that all of the controls (TimePickers and TextBlocks) at the bottom are outside of the controls:Panorma node. Move them inside that node, rather than inside the Grid that currently contains both them and the Panorama. You may well want to move them all the way inside the PanoramaItem node, depending on what you're trying to achieve.

Upvotes: 2

Related Questions