This is a migrated thread and some comments may be shown as answers.

Problems using RadslideViewer

3 Answers 125 Views
SlideView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Grey
Top achievements
Rank 1
Grey asked on 04 Mar 2012, 05:09 PM
Hi, 

I have been facing issues using the Telerik Rad Slide Viewer fro windows mobile phone 7.1.

I am making a slide show with some images and have taken code from the example at Telerik Tv. 

 The problem is I see the Rad toggle switch as on but no slide show occurs. I also tried toggling the switch to off and then again to ON but the slide show simply does not start. I tried changing the type of all images to Resource , it did not work out. Then setting back the properties to Content. No use..

I tried making images .jpg  from current.png also. All in vain. All images are of diff size. They are present under folder images of my project.

The version of Telerik Rad Controls that  I am using is :-v.2011.3.1221.2040

The XAML Code looks like this:-

<phone:PhoneApplicationPage  x:Class="Anonymous.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"
xmlns:teleriklcontrols="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
shell:SystemTray.IsVisible="True">
 
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
 
    <!--TitlePanel contains the name of the application and page title-->
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock x:Name="ApplicationTitle" Text="Humor Slide Box" Style="{StaticResource PhoneTextNormalStyle}" Width="174" />
    </StackPanel>
 
    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <telerikPrimitives:RadSlideView x:Name="kSlideView" IsLoopingEnabled="True">
            <telerikPrimitives:RadSlideView.ItemTemplate>
                <DataTemplate>
                    <Image Source="{Binding Uri}" Stretch="Fill"/>
                </DataTemplate>
            </telerikPrimitives:RadSlideView.ItemTemplate>
             
            <telerikPrimitives:RadSlideView.DataSource>
                <telerikPrimitives:SlideViewPictureSource ItemsSource="{Binding}" />
            </telerikPrimitives:RadSlideView.DataSource>
             
         </telerikPrimitives:RadSlideView>
         
        <telerikPrimitives:RadToggleSwitch Grid.Row="1"
                                           Header="loop"
                                           IsChecked="{Binding ElementName=kSlideView, Path=IsLoopingEnabled, Mode=TwoWay}">
             
        </telerikPrimitives:RadToggleSwitch>
                                            
    </Grid>
</Grid>

The XAML.cs Code looks like this

public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);
        }
 
        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            string[] uri = new string[51];
            for (int i = 0; i < 50; i++)
            {
                uri[i] = "../Images/" + "Image" + (i + 1) + ".png";
            }
 
                                 kSlideView.DataContext=uri;
        }
    }


 

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 07 Mar 2012, 03:53 PM
Hi,

Thank you for contacting us.

RadSlideView's IsLoopingEnabled property determines whether the user can loop among the items infinitely. That is, when the last item is reached, the next item to follow is the first item and vice-versa in the opposite direction. It doesn't provide SlideShow functionality. If you want such functionality, you can use a DispatcherTimer and on the ticks you can call the MoveToNextItem method. You can check out the RadSlideView's FirstLook example in our Examples solution, where you can see our implementation of this scenario.

I hope this information helps. Let me know if I can assist you further.

Greetings,
Todor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Pakeer
Top achievements
Rank 1
answered on 13 Mar 2012, 08:13 PM
Hi,

I am planning to use SlidView control in one of my WP7 apps.
My requirement is:
The number of images/pictured which are loaded in the slideview control is unlimited, for instance, it could be 10, 100, 1000 etc. Could you please let me know whether slideview can handle such scenario, if yes, do you have a sample code ? What is the maximum number of images it can handle with efficient memory handling (to be used in devices such as 256MB Nokia 610). If it can do it, I like to buy this control.

Does Slideview accept ObservableCollection (a collection of images where the number of images will change on the fly).

Thanks.

Regards,
-Jailani
0
Todor
Telerik team
answered on 14 Mar 2012, 01:02 PM
Hi Pakeer,

You can read here the response regarding the same question.

All the best,
Todor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
SlideView
Asked by
Grey
Top achievements
Rank 1
Answers by
Todor
Telerik team
Pakeer
Top achievements
Rank 1
Share this question
or