PagingItemsControl Go To Page

Nov 23, 2014 at 9:49 PM
Is there a way to go to a page programically?

like pagedControl.setPage(0); or something
Coordinator
Dec 1, 2014 at 3:29 PM
You need to add the following using statement at the top of your class:
using Framework.UI.Controls;
You can then set the page like so:
public void SetPage(ItemsControl pagingItemsControl, int page)
{
    PagingDecorator pagingDecorator = pagingItemsControl.FindVisualChild<PagingDecorator>();
    if ((page >= 0) &&
        (page < pagingDecorator.Items.Count))
    {
        pagingDecorator.SelectedIndex = page;
    }
}
I have updated the sample application with this info. You will see it in the next release.
Coordinator
Dec 1, 2014 at 3:32 PM
As an aside, Elysium Extra tries its best not to create new classes for controls and reuses existing controls in WPF as much as possible. A lot of the controls are really just styles and some have no code whatsoever (The Fish Eye ListBox is a good example).

It's probably time to refactor this control and use a ListBox instead of a ItemsControl. That would make it a lot easier to use. In my own use cases I've never needed to set the SelectedIndex of this control but I can see that it can be useful.