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

Create PaginationControl by Code , Not binding

1 Answer 32 Views
PaginationControl
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dương
Top achievements
Rank 1
dương asked on 22 May 2014, 05:18 AM
Hi 
I have a SlideView with items. But each item is Grid. Each item not same

This is code :

private ObservableCollection<Grid> radItemtemList = new ObservableCollection<Grid>();

            for (int i = CountList - 1; i >= 0; i--)
            {
                Grid gr = new Grid() { Tag = i };
                gr.Children.Add(new PiecesTemplate(item, null, iso));
                radItemtemList.Add(gr);
            }
slideView.ItemsSource = radItemtemList;
slideView.SelectionChanged += slideView_SelectionChanged;

Now i want use PaginationControl And PreviewTemplate for this slideView.  
How can i do ?


1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 27 May 2014, 06:58 AM
Hi,

Thank you for wiring.

In order to use RadPaginationControl in code and set its relation to RadSlideView, you simply need to set its PageProvider similarly to the way this is done in our examples:

paginationControl.PageProvider = slideView;

The ItemPreviewTemplate replaces the ItemTemplate for the adjacent items, so my suggestion is to move the Grid to an ItemTemplate that is reused instead of adding new Grid instances as actual items. Similar scenario is demonstrated in this article.

I hope this information helps.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PaginationControl
Asked by
dương
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or