Windows phone 7 在'中滚动全景项目标题;宽';全景项目

Windows phone 7 在'中滚动全景项目标题;宽';全景项目,windows-phone-7,Windows Phone 7,我有兴趣创建自己的“中心”Panorama。我已经让“宽”PanoramaItem工作了,但我现在尝试模仿在Marketplace hub中看到的行为,当您在hub中移动时,PanoramaItem标题会滚动 我正在寻找一种方法,让它平滑地动画到中心的末端。以前有没有人尝试过这个,或者有什么建议 我想是这样的: //OnPanoramaViewChanged //get X location of viewport //animate title to X location 但是,全景图似乎没

我有兴趣创建自己的“中心”
Panorama
。我已经让“宽”
PanoramaItem
工作了,但我现在尝试模仿在Marketplace hub中看到的行为,当您在hub中移动时,PanoramaItem标题会滚动

我正在寻找一种方法,让它平滑地动画到中心的末端。以前有没有人尝试过这个,或者有什么建议

我想是这样的:

//OnPanoramaViewChanged
//get X location of viewport
//animate title to X location
但是,全景图似乎没有附加
ScrollViewer
属性

如果你好奇的话,下面是我如何制作一个全景项目的

<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>

Silverlight Panorama控件不支持您所追求的行为,也不提供自定义行为的功能


如果你真的想要这个,那么你需要从头开始构建你自己的控件。我预计这将是超出合理范围的努力。只需避免创建非常宽的全景项目即可。

谢谢。我希望有一个更简单的方法,但我们的客户无论如何都放弃了这个想法,所以不会再让我在晚上不停地思考;P