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 个标题组成一页)。但我有相反的看法。

我的xml代码:

<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