如何在Windows Phone 8中使用幻灯片视图控件

时间:2014-07-01 13:08:03

标签: windows-phone-8

有没有人在Windows Phone 8中使用过slideview(Slide View)控件。我已经安装了nuget(Nuget)但无法在项目中使用它。如果有人可以提供一些链接或样本,那将是一个很大的帮助。

由于

塞巴斯蒂安

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

添加Nuget包并使用以下

替换页面中的xaml
<Grid x:Name="LayoutRoot" Background="Transparent">
    <library:SlideView SelectionChanged="SlideView_OnSelectionChanged">
        <!--Left Panel-->
        <Grid Background="Tomato" Width="400">
        </Grid>

        <!--Main Panel-->
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
                <TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
                <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
            </StackPanel>

            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            </Grid>
        </Grid>
        <!--Right Panel-->
        <!--<Grid Background="Firebrick" Width="400" />-->
    </library:SlideView>
</Grid>

顺便说一下,您可以在Source Code tab of the codeplex projet中找到大量样本。