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

RadBook and RadDataPager

1 Answer 31 Views
Book
This is a migrated thread and some comments may be shown as answers.
Dima
Top achievements
Rank 1
Dima asked on 27 Jun 2010, 06:02 PM
Page added the following
  <UserControl.Resources>
        <DataTemplate x:Key="DummyPageTemplate">
            <Border BorderBrush="Black" BorderThickness="2" Background="LightGray">
                <TextBlock Text="{Binding Name}" HorizontalAlignment="Center"
                        VerticalAlignment="Center" />
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="DataPageTemplate">
            <Border BorderBrush="Black" BorderThickness="2" Background="LightGray">
                <Image Source="{Binding ImageSource}" />
            </Border>
        </DataTemplate>
        <local:PageTemplateSelector x:Key="PageTemplateSelector"
                DataPageTemplate="{StaticResource DataPageTemplate}"
                DummyPageTemplate="{StaticResource DummyPageTemplate}" />
    </UserControl.Resources>
    <Grid VerticalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions >

        <telerikGridView:RadDataPager x:Name="radDataPager2" HorizontalAlignment="Center"
                Source="{Binding ItemsSource, ElementName=book1}"
                DisplayMode="All" PageSize="1" Width="750" />
        <telerikNavigation:RadBook x:Name="book1" Width="750" Grid.Row="1"
                LeftPageTemplateSelector="{StaticResource PageTemplateSelector}"
                RightPageTemplateSelector="{StaticResource PageTemplateSelector}"  
                IsKeyboardNavigationEnabled="True" Margin="0 1" 
                 />
        <telerikGridView:RadDataPager Grid.Row="2" x:Name="radDataPager1"
                HorizontalAlignment="Center" Source="{Binding ItemsSource, ElementName=book1}"
                DisplayMode="All" IsTotalItemCountFixed="True"
                 Width="750"  PageSize="1"/>
    </Grid>

But the book does not leafing through page by clicking on the page. What is the problem?






1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 29 Jun 2010, 01:34 PM
Hello Dima,

In the RadDataPager, instead of binding to RadBook's ItemsSource, you need to bind to RadBook's PagedItems property:

<telerikGridView:RadDataPager x:Name="radDataPager2" HorizontalAlignment="Center"
                Source="{Binding PagedItems, ElementName=book1}" DisplayMode="All" PageSize="1"
                Width="750" />

Give it a try and let me know how it works for you.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverilght applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Sincerely yours,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Book
Asked by
Dima
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or