Minimum of 8 Items?

5 posts, 0 answers
  1. krisdoff
    krisdoff avatar
    12 posts
    Member since:
    Nov 2006

    Posted 04 Sep 2011 Link to this post

    Hi there,

    I am desparately trying to get the Coverflow control to work for a project I am working on.  I took the RedCoverFlowItemContainer style from the "First look" demo, and bound datacontext to a control that encompasses the CloverFlow, and set the CoverFlow ItemSource in XAML to point to a suitable Observable collection.  This yielded nothing. 

    After much investigation and using the code from your Flikr data binding example I could get the items to appear.  So I gradually introduced my code (which utimately gets a list of image URLS from my business logic layer) into yours, but as soon as I used my own images the control yielded nothing.  Eventually I realized it was not the nature of my images but the quantity!

    If I take your Flikr example and break out of the loop after 7 images have been added, the control shows nothing.  Conversely, If I replicate my own images so they exceeds 7 - it shows them!

    I am sure I am missing something, please help, I have to get this up and running ASAP.

    Thanks
    Chris

    <aurum:AurumControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  xmlns:xx="http://schemas.microsoft.com/client/2007"  xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  x:Class="Aurum.Views.TestStuffView"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:aurum="clr-namespace:Aurum" 
                                xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
      
                                xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
      
      
                 mc:Ignorable="d"    >
      
      
        <UserControl.Resources>
      
            <LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF727272" Offset="0"/>
                <GradientStop Color="#FF727272" Offset="0.996"/>
                <GradientStop Color="#FF5D5D5D" Offset="0.5889"/>
            </LinearGradientBrush>
            <Style x:Key="RadCoverFlowItemContainerStyle" TargetType="ListBoxItem">
                <Setter Property="Padding" Value="3"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="VerticalContentAlignment" Value="Top"/>
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="TabNavigation" Value="Local"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="telerik:RadCoverFlowItem">
                            <Grid x:Name="Root" Opacity="0" Background="{TemplateBinding Background}">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver" />
                                        <VisualState x:Name="Disabled" />
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                        <VisualState x:Name="Selected"/>
                                        <VisualState x:Name="Unselected"/>
                                        <VisualState x:Name="SelectedUnfocused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="RelativePositionStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="0:0:0.4"/>
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Centered" >
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="50" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="NameLeft" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="50" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="NameRight" d:IsOptimized="True"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="BeforeSelected">
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="0.8" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="0.8" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="13" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundLeft" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedContent" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="24" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="NameCenter" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Description" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="50" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="NameRight" d:IsOptimized="True"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="AfterSelected">
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="0.8" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="0.8" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="-13" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="Photo" d:IsOptimized="True">
                                                    <DoubleAnimation.EasingFunction>
                                                        <CubicEase EasingMode="EaseOut"/>
                                                    </DoubleAnimation.EasingFunction>
                                                </DoubleAnimation>
                                                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundRight" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedContent" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="20" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="NameCenter" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Description" d:IsOptimized="True"/>
                                                <DoubleAnimation Duration="0" To="50" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="NameLeft" d:IsOptimized="True"/>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                        <VisualState x:Name="Unfocused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="LayoutStates">
                                        <VisualState x:Name="AfterLoaded">
                                            <Storyboard>
                                                <DoubleAnimation To="1" Duration="0:0:0.25" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" />
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="BeforeLoaded"/>
                                        <VisualState x:Name="BeforeUnloaded"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Border x:Name="Background" BorderThickness="1" Height="216" VerticalAlignment="Top" Width="216" CornerRadius="5" BorderBrush="#FF00557D">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,0.997" StartPoint="0.5,-0.004">
                                            <GradientStop Color="#FF6CABC6" Offset="0.01"/>
                                            <GradientStop Color="#FF4988A9" Offset="0.01"/>
                                            <GradientStop Color="#FF0D4E6D" Offset="0.05"/>
                                            <GradientStop Color="#FF003754" Offset="0.05"/>
                                            <GradientStop Color="#FF01547B" Offset="0.159"/>
                                            <GradientStop Color="#FF01547B" Offset="0.315"/>
                                            <GradientStop Color="#FF00567E" Offset="0.56"/>
                                            <GradientStop Color="#FF003754" Offset="0.965"/>
                                            <GradientStop Color="#FF01547B" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border x:Name="BackgroundRight" BorderThickness="1" Height="216" VerticalAlignment="Top" Width="216" CornerRadius="5" BorderBrush="#FF00557D" Opacity="0">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0,0.496" StartPoint="1,0.496">
                                            <GradientStop Color="#FF6CABC6" Offset="0.01"/>
                                            <GradientStop Color="#FF4988A9" Offset="0.01"/>
                                            <GradientStop Color="#FF0D4E6D" Offset="0.05"/>
                                            <GradientStop Color="#FF003754" Offset="0.05"/>
                                            <GradientStop Color="#FF01547B" Offset="0.159"/>
                                            <GradientStop Color="#FF01547B" Offset="0.315"/>
                                            <GradientStop Color="#FF00567E" Offset="0.56"/>
                                            <GradientStop Color="#FF003754" Offset="0.965"/>
                                            <GradientStop Color="#FF01547B" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <Grid>
                                        <Path Stretch="Fill" Opacity="1" Data="M 692.25,186 C688.7981567382812,186 686,188.7982177734375 686,192.25 686,192.25 686,221 686,221 686,221 896,221 896,221 896,221 896,192.25 896,192.25 896,188.7982177734375 893.201904296875,186 889.75,186 889.75,186 692.25,186 692.25,186 z" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5" Height="35" HorizontalAlignment="Right" Margin="0,87.5,-1,85.5">
                                            <Path.Fill>
                                                <RadialGradientBrush GradientOrigin="0.5,0.266">
                                                    <GradientStop Color="#E500A5F4" Offset="0.026"/>
                                                    <GradientStop Color="#0000A5F4" Offset="1"/>
                                                    <GradientStop Color="#7F00A5F4" Offset="0.5"/>
                                                </RadialGradientBrush>
                                            </Path.Fill>
                                            <Path.RenderTransform>
                                                <CompositeTransform Rotation="90" TranslateX="87"/>
                                            </Path.RenderTransform>
                                        </Path>
                                        <TextBlock x:Name="NameRight" Height="35" FontSize="18" Foreground="#FFF0F0F0" Text="{Binding Path=Asset.astRef}" TextAlignment="Center" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Margin="1,87.5,-1,85.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
                                            <TextBlock.RenderTransform>
                                                <CompositeTransform Rotation="90" TranslateX="80"/>
                                            </TextBlock.RenderTransform>
                                        </TextBlock>
                                    </Grid>
                                </Border>
                                <Border x:Name="BackgroundLeft" BorderThickness="1" Height="216" VerticalAlignment="Top" Width="216" CornerRadius="5" BorderBrush="#FF00557D" RenderTransformOrigin="0.5,0.5" Opacity="0">
                                    <Border.RenderTransform>
                                        <CompositeTransform Rotation="180"/>
                                    </Border.RenderTransform>
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0,0.496" StartPoint="1,0.496">
                                            <GradientStop Color="#FF6CABC6" Offset="0.01"/>
                                            <GradientStop Color="#FF4988A9" Offset="0.01"/>
                                            <GradientStop Color="#FF0D4E6D" Offset="0.05"/>
                                            <GradientStop Color="#FF003754" Offset="0.05"/>
                                            <GradientStop Color="#FF01547B" Offset="0.159"/>
                                            <GradientStop Color="#FF01547B" Offset="0.315"/>
                                            <GradientStop Color="#FF00567E" Offset="0.56"/>
                                            <GradientStop Color="#FF003754" Offset="0.965"/>
                                            <GradientStop Color="#FF01547B" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <Grid>
                                        <Path Stretch="Fill" Opacity="1" Data="M 692.25,186 C688.7981567382812,186 686,188.7982177734375 686,192.25 686,192.25 686,221 686,221 686,221 896,221 896,221 896,221 896,192.25 896,192.25 896,188.7982177734375 893.201904296875,186 889.75,186 889.75,186 692.25,186 692.25,186 z" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5" Height="35" HorizontalAlignment="Right" Margin="0,87.5,-1,85.5">
                                            <Path.Fill>
                                                <RadialGradientBrush GradientOrigin="0.5,0.266">
                                                    <GradientStop Color="#E500A5F4" Offset="0.026"/>
                                                    <GradientStop Color="#0000A5F4" Offset="1"/>
                                                    <GradientStop Color="#7F00A5F4" Offset="0.5"/>
                                                </RadialGradientBrush>
                                            </Path.Fill>
                                            <Path.RenderTransform>
                                                <CompositeTransform Rotation="90" TranslateX="87"/>
                                            </Path.RenderTransform>
                                        </Path>
                                        <TextBlock x:Name="NameLeft" Height="35" FontSize="18" Foreground="#FFF0F0F0" Text="{Binding Path=Reference}" TextAlignment="Center" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Margin="1,87.5,-1,85.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
                                            <TextBlock.RenderTransform>
                                                <CompositeTransform Rotation="90" TranslateX="80"/>
                                            </TextBlock.RenderTransform>
                                        </TextBlock>
                                    </Grid>
                                </Border>
                                <Grid x:Name="SelectedContent" VerticalAlignment="Top">
                                    <Path Stretch="Fill" Opacity="1" Data="M 692.25,186 C688.7981567382812,186 686,188.7982177734375 686,192.25 686,192.25 686,221 686,221 686,221 896,221 896,221 896,221 896,192.25 896,192.25 896,188.7982177734375 893.201904296875,186 889.75,186 889.75,186 692.25,186 692.25,186 z" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5" Height="35" HorizontalAlignment="Right" Margin="0,87.5,1,85.5">
                                        <Path.Fill>
                                            <RadialGradientBrush GradientOrigin="0.5,0.266">
                                                <GradientStop Color="#E500A5F4" Offset="0.026"/>
                                                <GradientStop Color="#0000A5F4" Offset="1"/>
                                                <GradientStop Color="#7F00A5F4" Offset="0.5"/>
                                            </RadialGradientBrush>
                                        </Path.Fill>
                                        <Path.RenderTransform>
                                            <CompositeTransform TranslateY="-87"/>
                                        </Path.RenderTransform>
                                    </Path>
      
                                    <TextBlock x:Name="NameCenter" Height="35" Margin="9,5.334,8,0" VerticalAlignment="Top" FontSize="16" Foreground="#FFF0F0F0" TextAlignment="Center" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Text="{Binding Path=Reference}">
                                        <TextBlock.RenderTransform>
                                            <CompositeTransform/>
                                        </TextBlock.RenderTransform>
                                    </TextBlock>
                                    <Border Margin="8,30,7,0" BorderThickness="1" Height="165" VerticalAlignment="Top" CornerRadius="5" BorderBrush="#FF1D528C">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,0.78" StartPoint="0.5,0.277">
                                                <GradientStop Color="#FF0F3153"/>
                                                <GradientStop Color="#FF0A1F33" Offset="0.698"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                        <Grid>
                                            <Path
                                        Stretch="Fill"
                                        Opacity="1"
                                        Data="M692.25,186 C688.79816,186 686,188.79822 686,192.25 C686,192.25 686,221 686,221 C686,221 879,221 879,221 C879,221 879,192.25 879,192.25 C879,188.79822 876.2019,186 872.75,186 C872.75,186 692.25,186 692.25,186 z" UseLayoutRounding="False" Margin="0,-7,0,0" Height="88" VerticalAlignment="Top">
                                                <Path.Fill>
                                                    <RadialGradientBrush GradientOrigin="0.5,0.266">
                                                        <GradientStop Color="#E5053E9B" Offset="0.026"/>
                                                        <GradientStop Color="#000061FF" Offset="1"/>
                                                        <GradientStop Color="#2F0A83F3" Offset="0.5"/>
                                                    </RadialGradientBrush>
                                                </Path.Fill>
                                            </Path>
                                            <Border CornerRadius="2" BorderBrush="#641D528C" BorderThickness="1" VerticalAlignment="Bottom" Margin="4"
                                            HorizontalAlignment="Stretch" MinHeight="65">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#191069CC"/>
                                                        <GradientStop Color="#4C005EC6" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Border.Background>
      
                                                <TextBlock x:Name="Description" Height="67" Margin="19,0,17,-2" VerticalAlignment="Bottom" Foreground="#FFDFDFDF" 
                                                   TextWrapping="Wrap" FontSize="10.67" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
                                            <TextBlock.RenderTransform>
                                                <CompositeTransform/>
                                            </TextBlock.RenderTransform>
                                                    <Run Text="Repository Id: "/><Run Text="{Binding Path=RepositoryReference}"/><LineBreak/>
                                                    <Run Text="Version: "/><Run Text="{Binding Path=Version}"/><LineBreak/>
                                                    <Run Text="Type: "/><Run Text="{Binding Path=MimeType}"/><LineBreak/>
                                                </TextBlock>
                                            </Border>
                                        </Grid>
                                    </Border>
                                </Grid>
      
                                <Border x:Name="Photo" BorderBrush="#FF3178C6" BorderThickness="1" Margin="0" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
                                    <Border.RenderTransform>
                                        <CompositeTransform ScaleX="0.36" ScaleY="0.36" TranslateY="-30"/>
                                    </Border.RenderTransform>
                                    <Border.Background>
                                        <!--{Binding Path=Thumbnail}-->
                                        <ImageBrush ImageSource="{Binding Path=TheImage}" Stretch="UniformToFill" />
                                    </Border.Background>
                                </Border>
      
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Width" Value="216"/>
                <Setter Property="Height" Value="216"/>
            </Style>
      
        </UserControl.Resources>
        <aurum:AurumModalPage x:Name="ampMain" TitleText="{Binding Path=FormTitle, Mode=OneWay}"  >
            <aurum:AurumModalPage.Content>
                <ScrollViewer Width="800" Height="500" x:Name="scvHost">
                    <!--Decoration borders-->
      
      
                    <telerik:RadCoverFlow x:Name="coverFlow" OffsetY="100" VerticalAlignment="Center" ItemsSource="{Binding Path=Assets}"
                                            CameraViewpoint="Center" ItemScale="0.7" RotationY="60" ReflectionHeight="0.2" ReflectionOpacity="2"
                                            DistanceBetweenItems="35" DistanceFromSelectedItem="-30" IsVirtualizing="True"
                                            ItemContainerStyle="{StaticResource RadCoverFlowItemContainerStyle}">
      
                    </telerik:RadCoverFlow>
      
                </ScrollViewer>
            </aurum:AurumModalPage.Content>
        </aurum:AurumModalPage>
      
      
    </aurum:AurumControl>
    using System;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Net;
    using System.Xml.Linq;
    using System.Windows.Controls;
    using Aurum.ArgentumWS;
    using System.Collections.Generic;
    using Aurum.ViewModels;
      
      
      
    namespace Aurum.Views
    {
        public class Whatever
        {
            public ObservableCollection<AssetImageSummaryII> Assets { get; set; }
            public Whatever()
            {
                Assets = new ObservableCollection<AssetImageSummaryII>();
            }
      
        }
      
        public class AssetImageSummaryII
        {
            public Uri TheImage { get; set; }
            public string Title { get; set; }
      
            public AssetImageSummaryII(string imageURL, string title)
            {
                TheImage = new Uri(imageURL, UriKind.Absolute);
                Title = title;
            }
        }
      
        /// <summary>
        /// Description for AssetDetailsMainView.
        /// </summary>
        public partial class TestStuffView : AurumControl
        {
            /// <summary>
            /// Initializes a new instance of the AssetDetailsMainView class.
            /// </summary>
            /// 
      
            Whatever myWhatever = new Whatever();
      
      
      
            public TestStuffView()
            {
                InitializeComponent();
      
                WebClient webClient = new WebClient();
      
                webClient.DownloadStringCompleted += this.OnDownloadStringCompleted;
                webClient.DownloadStringAsync(new Uri(@"http://api.flickr.com/services/feeds/photos_public.gne?id=57287444@N02&lang=en-us&format=rss_2", UriKind.Absolute));
                 
      
            }
         
      
      
            private void OnDownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
            {
                ObservableCollection<AssetImageSummaryII> flickerImagesCollection = new ObservableCollection<AssetImageSummaryII>();
      
                XDocument feed = XDocument.Parse(e.Result);
      
                int i = 0;
      
                foreach (XElement entry in feed.Root.Elements(XName.Get("entry", "http://www.w3.org/2005/Atom")))
                {
                    string[] links = (from link in entry.Elements(XName.Get("link", "http://www.w3.org/2005/Atom"))
                                      where string.Compare(link.Attribute(XName.Get("rel")).Value, "enclosure") == 0
                                      select link.Attribute(XName.Get("href")).Value).ToArray<string>();
                    if (links.Length > 0)
                    {
                        flickerImagesCollection.Add(new AssetImageSummaryII(links[0], links[0]));
                        i++;
                        if (i == 7)
                            break;
       
                    }
      
                      
      
                      
                }
      
                myWhatever.Assets = flickerImagesCollection;
                scvHost.DataContext = myWhatever;
            }
      
        }
    }
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 07 Sep 2011 Link to this post

    Hello Krisdoff,

    I've tried to reproduce the described issue using your code but without much success. I've attached my test project, please download it and give it a try. What am I missing?

    Greetings,
    Yana
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. krisdoff
    krisdoff avatar
    12 posts
    Member since:
    Nov 2006

    Posted 22 Sep 2011 Link to this post

    Hi Yana,
    So sorry for the long delay, after the air of desparation in my original post, I go and leave it for so long to try your code!  I got around it for my demo by ensuring there were enough images .. not exactly clever ;)

    So, yes your code works, but not if you encompass the coverflow in a scroll viewer for some reason, can you give that a try for me?

    Thanks

    Chris

     

     

    <ScrollViewer Width="800" Height="500" x:Name="scvHost">

     

     

    <telerik:RadCoverFlow x:Name="coverFlow" OffsetY="100" VerticalAlignment="Center" ItemsSource="{Binding Path=Assets}"

     

    CameraViewpoint="Center" ItemScale="0.7" RotationY="60" ReflectionHeight="0.2" ReflectionOpacity="2"

     

    DistanceBetweenItems="35" DistanceFromSelectedItem="-30" IsVirtualizing="True"

     

    ItemContainerStyle="{StaticResource RadCoverFlowItemContainerStyle}">

     

     

    </telerik:RadCoverFlow>

     

     

     

    </ScrollViewer>

  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Sep 2011 Link to this post

    Hi Krisdoff,

    I've tried it with the ScrollViewer and still all the items are shown.  Can you please set Width and Height properties of the Coverflow and let us know the result?

    <telerik:RadCoverFlow x:Name="coverFlow" OffsetY="100" VerticalAlignment="Center" Width="800" Height="400"  ... >


    Best wishes,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. krisdoff
    krisdoff avatar
    12 posts
    Member since:
    Nov 2006

    Posted 27 Sep 2011 Link to this post

    Hi Yana,

    Yes, that sorted it out.  In my actual application, the size was explicitly set, but the control it was within did not have an explicit width.  It worked fine when there were more than 7 items, but less than that it displayed nothing. 

    It all works now though, so thanks for you help Yana.

    Chris
Back to Top
DevCraft banner