1

FluidKit ライブラリをプロジェクトに統合しました。それはうまくいきます。これを使用して実装します:

private void WindowLoaded(object sender, RoutedEventArgs e)
    {
        _dataSource = FindResource("DataSource") as StringCollection;
        _dataSource.Insert(0, "pack://application:,,/Resources/Images/CoverFlow/01.jpg");
        _dataSource.Insert(1, "pack://application:,,/Resources/Images/CoverFlow/02.jpg");
        _dataSource.Insert(2, "pack://application:,,/Resources/Images/CoverFlow/03.jpg");
        _dataSource.Insert(3, "pack://application:,,/Resources/Images/CoverFlow/04.jpg");
        _dataSource.Insert(4, "pack://application:,,/Resources/Images/CoverFlow/05.jpg");
        _dataSource.Insert(5, "pack://application:,,/Resources/Images/CoverFlow/06.jpg");
        _dataSource.Insert(6, "pack://application:,,/Resources/Images/CoverFlow/07.jpg");
        _dataSource.Insert(7, "pack://application:,,/Resources/Images/CoverFlow/08.jpg");
        _dataSource.Insert(8, "pack://application:,,/Resources/Images/CoverFlow/09.jpg");
        _dataSource.Insert(9, "pack://application:,,/Resources/Images/CoverFlow/10.jpg");
        _dataSource.Insert(10, "pack://application:,,/Resources/Images/CoverFlow/11.jpg");
        _dataSource.Insert(11, "pack://application:,,/Resources/Images/CoverFlow/12.jpg");

        _elementFlow.SelectedIndex = _dataSource.Count / 2;
    }

しかし、ライブラリを自分のプロジェクトに適応させることはできません。8ページ(1枚の写真と1枚のタイトルで1ページを構成)のカバーフローを1つ作成しようとしています。しかし、私は反対です。

私のxamlコード:

<Grid>
                <ItemsControl x:Name="ContentItems" 
                              ItemsSource="{Binding Path=Category.Content, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:StorySelectionControl}}}"
                              >
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Rows="2" Height="{Binding ActualHeight, ElementName=ContentScrollViewer, Mode=OneWay}" />
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <FluidKit:ElementFlow x:Name="_elementFlow" TiltAngle="45" ItemGap="0.2" FrontItemGap="1.5" PopoutDistance="1.5" HasReflection="True"
                                    SelectedIndex="3" Margin="0,0,0,0">
                                <Border x:Name="ImageBorder" BorderBrush="{StaticResource SelectedColorBrush}">
                                    <Grid>
                                        <Image Source="{Binding ContentImage}" Margin="1,1,1,1" RenderOptions.BitmapScalingMode="HighQuality" Stretch="UniformToFill" />
                                    </Grid>
                                </Border>
                                <TextBlock x:Name="StoryTitle"  Text="{Binding Title}" Foreground="Black" Grid.Row="1"
                                                   Margin="0,25,0,0" FontFamily="Segoe" FontWeight="Light" HorizontalAlignment="Left" VerticalAlignment="Top"
                                                   FontSize="30" Height="80" TextAlignment="Left" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" />
                                <FluidKit:ElementFlow.Camera>
                                    <PerspectiveCamera FieldOfView="50" Position="0,0,6" LookDirection="0,-0,-6"  />
                                </FluidKit:ElementFlow.Camera>
                            </FluidKit:ElementFlow>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>

私のカバーフロー画像リンク: http://img819.imageshack.us/img819/1057/capturevad.png

アイデアはありますか?わからないなら言って!私の英語はあまり上手ではありません:-)

4

0 に答える 0