This project is read-only.

How do I use ElementFlow?

Jan 4, 2013 at 10:23 PM
Edited Jan 4, 2013 at 10:27 PM

I'm relatively new to WPF, I come from a WinForms background, and I don't fully understand the example, from I what I see, I add the paths to my images to a StringCollection. 

 

This is what I have right now 

        public MainWindow()
        {
            InitializeComponent();
            elementFlow1.Layout = new CoverFlow();
            StringCollection itemssource = new StringCollection();
            itemssource.Add(@"Images\1.png");
            itemssource.Add(@"Images\2.png");
            elementFlow1.SelectedIndex = 0;
            elementFlow1.ItemsSource = itemssource;

        }


And I have the ElementFlow defined in XAML like so

        <fluidkit:ElementFlow 
            Grid.Row="1"
            Height="194" 
            Name="elementFlow1" 
            VerticalAlignment="Top" 
            Width="503"
          />

Lo and behold, when I run it, nothing happens :(
Can someone please explain how I'm supposed to use ElementFlow? The example doesn't really "explain" it very well, per se

Feb 7, 2013 at 12:28 AM
Edited Feb 7, 2013 at 12:29 AM
 <fk:ElementFlow x:Name="_elementFlow"
                              Grid.ColumnSpan="9"
                              SelectedIndex="3" Grid.RowSpan="6" ElementWidth="300" Grid.Row="1" ElementHeight="300"  >

            <fk:ElementFlow.Background>
                <LinearGradientBrush EndPoint="0.5,1"  StartPoint="0.5,0">
                    <GradientStop Color="White"/>
                    <GradientStop Color="Black" Offset="1"/>
                </LinearGradientBrush>
            </fk:ElementFlow.Background>

            <fk:ElementFlow.Camera>
                <PerspectiveCamera FieldOfView="45" LookDirection="0,-1,-6" Position="0,1,6.5"/>
            </fk:ElementFlow.Camera>
            
            <fk:ElementFlow.Layout>
                <fk:CoverFlow/>
            </fk:ElementFlow.Layout>

             
             <Image Height="300" Source="itempreview.png" Width="300"/>

             <Image Height="300" Source="itempreview.png" Width="300"/>

             <Image Height="300" Source="itempreview.png" Width="300"/>

             <Image Height="300" Source="itempreview.png" Width="300"/>

       </fk.ElementFlow>
That is a setup that holds 4 images in the Coverflow layout.