Displaying images from the PhotoChooserTask

2 posts, 0 answers
  1. Tim
    Tim avatar
    19 posts
    Member since:
    Dec 2011

    Posted 04 Feb 2012 Link to this post

    In my scenario, users are able to take & attach pictures to an object in the UI without ever saving back to the database. I want to display these images in a RadSlideView without having to save them to the database or Isolated Storage. Based on the ImageSource class, it looks like I should be able to do this, but nothing seems to work.

    void photoChooserTask_Completed(object sender, PhotoResult e)
        if (e.TaskResult != TaskResult.OK) { return; }
        byte[] photoData = new byte[e.ChosenPhoto.Length];
        e.ChosenPhoto.Read(photoData, 0, photoData.Length);
        BitmapImage image = new BitmapImage();
        ImageSource imageSource = image;
        this.slideView.DataContext = imageSource;
    <telerikPrimitives:RadSlideView x:Name="slideView" Height="200" IsZoomedOut="True" Grid.Row="8">
                <Image Source="{Binding Source}" />
            <telerikPrimitives:SlideViewPictureSource ItemsSource="{Binding}" />

    Unfortunately, nothing renders out. Any ideas?
  2. Georgi
    Georgi avatar
    296 posts

    Posted 08 Feb 2012 Link to this post

    Hi Tim,

    Thank you for contacting us and for your question.

    Last week we released a BETA of our Q1 2012 release. We have re-designed the architecture of RadSlideView so that it can meet all the requirements we collected from our users. It now exposes API, similar to the one in our RadDataBoundListBox - there is an ItemsSource property, which you can specify directly. You can dynamically change the source collection and in case it is an ObservableCollection, changes will be handled automatically. Providing ImageSource directly should also work as it is natively supported by the Image control.

    For more information you may see our documentation here.

    I hope this helps. Let me know if you need further assistance.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
Back to Top