私自身の「ハブ」の作成に興味がありますPanorama
。 PanoramaItem
が「ワイド」になっていますが、Marketplaceハブに表示される動作を模倣しようとしています。ここでは、PanoramaItemヘッダーがスクロールしてハブを移動します。「Wide」PanoramaItemのScroll PanoramaItemヘッダー
ハブの端にスムーズにアニメートする方法を探しています。誰もこれを前に試したことがありますか、または何か提案がありますか?
私はそれがこのようなものになるだろう想像:パノラマがScrollViewer
添付プロパティを持っていることは表示されません。しかし
//OnPanoramaViewChanged
//get X location of viewport
//animate title to X location
。
あなたが好奇心が強い場合は、ここで私はどのように広いパノラマアイテムを作ったのですか?
<controls:PanoramaItem ScrollViewer.HorizontalScrollBarVisibility="Visible" Header="movies" Orientation="Horizontal" Width="900">
<controls:PanoramaItem.HeaderTemplate >
<DataTemplate >
<StackPanel>
<TextBlock Foreground="{StaticResource PanoramaHeaderBrush}" Text="{Binding}">
</TextBlock>
</StackPanel>
</DataTemplate>
</controls:PanoramaItem.HeaderTemplate>
<StackPanel>
<!-- line list with image placeholder and text wrapping -->
<ListBox ItemsSource="{Binding Items}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Template>
<ControlTemplate>
<ItemsPresenter />
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="10">
<Grid Background="{StaticResource ControlTitlesInactivePivotBrush}" Width="173" Height="173" >
<TextBlock FontSize="24" Text="Movie Title (2010)" TextWrapping="Wrap" Style="{StaticResource PhoneTextGroupHeaderStyle}"/>
<Rectangle Fill="White" Height="48" Width="48" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<Rectangle.OpacityMask>
<ImageBrush ImageSource="/Test;component/movie_icn.png" />
</Rectangle.OpacityMask>
</Rectangle>
</Grid>
<TextBlock Text="Movie Title:" Margin="12,0,12,0" Foreground="Black" />
<TextBlock Text="The Title" Margin="12,-6,12,0" Foreground="Gray"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</controls:PanoramaItem>
ありがとうございました。私はもっと簡単な方法があったと思っていますが、私のクライアントはとにかくそのアイディアを廃止しました。 –