WP7 のパノラマ モードで小さなアプリケーションを作成しました。パノラマ アイテムに複数のコントロールを追加したいと考えています。
私の問題は、最初のコントロールしか見えないことです。
理由はわかりますか?
ここに私のXAMLコードがあります
<phone:PhoneApplicationPage
x:Class="DataArbitror.MainPage"
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:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="False" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" Loaded="PhoneApplicationPage_Loaded" BackKeyPress="PhoneApplicationPage_BackKeyPress">
<!--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}">
<StackPanel>
<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" />
<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" />
</StackPanel>
<!--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>
</Grid>
どうもありがとう :)