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

Panorama smooth scrolling

5 Answers 20 Views
Panorama
This is a migrated thread and some comments may be shown as answers.
next
Top achievements
Rank 1
next asked on 23 Jan 2018, 04:10 AM
Hi. 
With radPanorama I have the option of a smooth scroll (simulation of scroll with a gesture) to desired element from the code?
Thank you.

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Jan 2018, 10:41 AM
Hello,

You can use a timer and increase the scroll value:
Timer scrollTimer = new Timer();
 
public RadForm1()
{
    InitializeComponent();
;
    scrollTimer.Interval = 30;
    scrollTimer.Tick += ScrollTimer_Tick;
}
 
private void ScrollTimer_Tick(object sender, EventArgs e)
{
    var value = radPanorama1.PanoramaElement.ScrollBar.Value;
    if (value + 10 < radPanorama1.PanoramaElement.ScrollBar.Maximum)
    {
        radPanorama1.PanoramaElement.ScrollBar.Value += 10;
        if (radPanorama1.Items[30].ControlBoundingRectangle.X < 0 )//this will scroll to item 31
        {
            scrollTimer.Stop();
        }
    }
    else
    {
        scrollTimer.Stop();
    }
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    scrollTimer.Start();
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
next
Top achievements
Rank 1
answered on 23 Jan 2018, 12:33 PM
Thank you very much for fast answers, and for code example. :) 
First of all you use Winforms timer (very not accurate and have troubles when start\stop\change in not GUI threads)
So, no way to do something like
ScrollTo(tileElement, 1000)
where 1000 it is speed (time taken) for scroll?

I trying ScrollView(value)  with small amounts of scroll... All blinks and looks very sloppy.
My scenario of usage - some kind of photo library. Photos coming from external source. After some time of inactivity I need scroll to "last tile" each time when new tile added.  And I want to it smoothly. :)
Looks like Telerik radPanorama it best solution... If we can do smooth scrolling to selected tile element it will be really best solution. Thank you in advance.


0
Dimitar
Telerik team
answered on 23 Jan 2018, 01:05 PM
Hi,

The scrolling looks pretty smooth on my side with regular tiles. How large are the images on your side? How many images do you have?

Another control that you can use for this is RadCarousel. You can check the examples in the demo application as well. See attached video.

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
next
Top achievements
Rank 1
answered on 23 Jan 2018, 01:44 PM
I'm surprised with the quality of support.
Thank you. 
I try to use your approach and write report.
I use +\-1500 photos. Before create tiles I create preview images with size of tiles (approximately 400x250+ according to screen and panorama size (4 row as usual)) and assign Image property with this preview images.
0
Dimitar
Telerik team
answered on 24 Jan 2018, 12:45 PM
Hi,

The panorama is not designed to work with such amount of data. In this case, you can use RadListView which supports UI Virtualization. This way the performance will not depend on the items count. You can achieve a similar layout as well. I have attached an updated version of the project that shows this.

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Panorama
Asked by
next
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
next
Top achievements
Rank 1
Share this question
or