Telerik Forums
UI for Silverlight Forum
15 answers
124 views
There are a few posts about the posibility of viewing PDFs using the book control. Any chance this control will support multi-page tiffs in the future?
Martin Ivanov
Telerik team
 answered on 26 Dec 2014
1 answer
38 views
Hi telerik team,
We would like to zoom in/zoom out on book pages (last version). Is it that possible?
If there is a way, do you have any example or idea to do this? 

Thanks in advance,

Luis Castro M.
Tina Stancheva
Telerik team
 answered on 06 Dec 2013
2 answers
59 views
i  want to know if the lasted version support   one page mode ..
and if support can i   change the mode between  2 page and 1 page mode    easily  behind code ?
Egemen
Top achievements
Rank 1
 answered on 04 Oct 2013
1 answer
38 views
Hi, I need to adjust the colour and opacity of the page roll and spine shadows (not the drop shadows) of a RadBook control.

I have been looking at the sample mentioned here http://www.telerik.com/community/forums/silverlight/book/adjusting-gradient-shadow-near-spine.aspx but it seems like the radbook control has default shadows that I want to adjust - I dont want to add new ones.

Can I adjust the colour and width of the gradient shadows on the control? If not, and I have to do them myself as per the sample - how do I turn the default ones off?

Please note that I am using DataTemplates for my left and right pages, and my radbook in a Window not a UserControl.

Thanks in advance.

Jamie.



<Window x:Class="RadControlsWpfApp1.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
                Title="MainWindow" Height="540" Width="960" WindowState="Maximized" WindowStyle="None" WindowStartupLocation="CenterScreen" KeyUp="Window_KeyUp" MouseUp="Window_MouseUp" MouseDown="Window_MouseDown" MouseMove="Window_MouseMove" SizeChanged="Window_SizeChanged" ResizeMode="CanResize" Margin="0" SizeToContent="Manual">
    <Window.Background>
        <ImageBrush x:Name="bgImage" ImageSource="/RadControlsWpfApp1;component/Images/book.jpg" Stretch="Fill" Viewbox="-0.0375,-0.0375,1.075,1.075" Viewport="0,0,1,1" ViewportUnits="RelativeToBoundingBox" />
    </Window.Background>
    <Window.Resources>
        <DataTemplate x:Key="PageTemplate_l">
            <Border BorderThickness="1" Background="#FFF8F5EC" BorderBrush="#FFF8F5EC">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Image Source="{Binding PhotoSource}" HorizontalAlignment="Center"
                            VerticalAlignment="Center" />
                </Grid>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="PageTemplate_r">
            <Border BorderThickness="1" Background="#FFF8F5EC" BorderBrush="#FFF8F5EC">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Image Source="{Binding PhotoSource}" HorizontalAlignment="Center"
                            VerticalAlignment="Center" />
                </Grid>
            </Border>
        </DataTemplate>
 
    </Window.Resources>
    <Grid>
        <Grid x:Name="LayoutRoot" Margin="0,0,0,0">
            <telerikNavigation:RadBook x:Name="book1" LeftPageTemplate="{StaticResource PageTemplate_l}"
                RightPageTemplate="{StaticResource PageTemplate_r}" Margin="140,60,140,60" PageChanged="book1_PageChanged" ShowPageFold="Never"  FoldHintPosition="Top" PageFlipMode="None" PreviewPageFlipStarted="book1_PreviewPageFlipStarted" PageFlipStarted="book1_PageFlipStarted" PageFlipEnded="book1_PageFlipEnded">
                <telerik:RadBook.Effect>
                    <DropShadowEffect BlurRadius="3" ShadowDepth="10" Color="Gray" />
                </telerik:RadBook.Effect>
                <telerik:RadBook.ItemContainerStyle>
                    <Style TargetType="telerik:RadBookItem">
                        <Setter Property="Background" Value="Transparent" />
                        <Setter Property="Opacity" Value="1.0" />
                    </Style>
                </telerik:RadBook.ItemContainerStyle>
            </telerikNavigation:RadBook>
            <Image Height="450" HorizontalAlignment="Center" Margin="0,0,0,0" Name="image1" Stretch="UniformToFill" VerticalAlignment="Center" Width="400"/>
            <Canvas x:Name="btnCanvas"></Canvas>
        </Grid>

    </Grid>
</Window>
Dimitrina
Telerik team
 answered on 11 Sep 2013
4 answers
19 views
Is there a way to see the WYSIWYG preview of all radBook pages in the Design view panel of Visual Studio 2010, not just pages 1 and 2.  For example, if I load the sample app (http://www.telerik.com/help/silverlight/radbook-getting-started.html), I can only see pages 1 and 2, not 3 or 4. 
Tina Stancheva
Telerik team
 answered on 22 Jul 2013
4 answers
445 views
Here are my code (copy to NotePad then paste looks better):

    public partial class MainPage : UserControl
    {
        private const string DocumentPath = "CageManagementFeatures.docx";
        private RadDocumentBindingSource bindingSource = new RadDocumentBindingSource();
        private DocumentViewManager viewManager;

        public MainPage()
        {
            InitializeComponent();
            this.viewManager = (DocumentViewManager)this.Resources["viewManager"];
        }

        private void LoadDocument(Stream stream, string extension)
        {
            RadDocument doc;

            IDocumentFormatProvider provider = DocumentFormatProvidersManager.GetProviderByExtension(extension);
            if (provider != null)
            {
                doc = provider.Import(stream);
            }
            else
            {
                MessageBox.Show("Unknown format.");
                return;
            }

            doc.Measure(RadDocument.MAX_DOCUMENT_SIZE);
            doc.Arrange(new RectangleF(PointF.Empty, doc.DesiredSize));

            doc.LayoutMode = DocumentLayoutMode.Paged;

            doc.DefaultPageLayoutSettings.Width = 320 / 0.7F;
            doc.DefaultPageLayoutSettings.Height = 390 / 0.7F;
            doc.SectionDefaultPageMargin = new Padding(55);
            doc.Sections.First.PageMargin = new Padding(55);

            doc.UpdateLayout();

            this.book.RightPageIndex = 0;
            this.viewManager.Document = doc;
            bindingSource.Document = doc;
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            <!-- NULL ERROR OCCURS IN THIS LINE-->
            using (Stream stream = Application.GetResourceStream(this.GetResourceUri(DocumentPath)).Stream)
            {
                this.LoadDocument(stream, ".docx");
            }
            this.book.ItemsSource = bindingSource;
        }

        private Uri GetResourceUri(string resource)
        {
            AssemblyName assemblyName = new AssemblyName(this.GetType().Assembly.FullName);
            string resourcePath = "/" + assemblyName.Name + ";component/" + resource;
            Uri resourceUri = new Uri(resourcePath, UriKind.Relative);

            return resourceUri;
        }

        private void Simulation_Click(object sender, RoutedEventArgs e)
        {
            book.Visibility = Visibility.Collapsed;
            radMediaPlayer1.Visibility = Visibility.Visible;
            radMediaPlayer1.Play();
        }
    }
}


1. Why am I getting a Null Value when stepping through the code shows a
value in the GetResourceUri return value?
2. I have the document in a folder "Documents/Cage Management Features.docx"
which didn't work and so I placed it in the root folder and removed spaces,
but that didn't work either.
3. The mainpage.xaml is copied from the sample.
Any suggestions would be appreciated. Thank you.

Tina Stancheva
Telerik team
 answered on 22 May 2013
7 answers
164 views

I want to use the rich digital media experience book to make a flipping book

I need to put a pdf viewer inside page and bind it to a pdf path.
The pdf file exist on the server at the website not at the silverlight application
what is the xaml and c# code that do this ?


Kaiven
Top achievements
Rank 1
 answered on 19 Apr 2013
3 answers
38 views
Hi,

Is it possible to have a control ( e.g. Data Grid) spanned across two pages in Rad book Control as shown in the attached image?

can I get any code sample ?


 
Hristo
Telerik team
 answered on 26 Feb 2013
4 answers
33 views
Just a beginner on SL and have a couple of questions.

I want to organize several sparklines on about 5 different pages.  Each page will have 6+ sparklines. 
1. Is this too much for a Book as far as recsources go and speed.
2.  How do you go about laying out a page to accept the sparlines.
3.  I want to link each page, via a button to go to a full chartview for detailed analysis of the data.

Pavel R. Pavlov
Telerik team
 answered on 29 Nov 2012
3 answers
39 views
Hi,

I'm trying to use the book to create a diary in which users can create 1 entry a day.
<telerik:RadBook Grid.Row="0" x:Name="book" ItemsSource="{Binding DagboekNotities}"
                                         LeftPageTemplate="{StaticResource LeftPageTemplate}"
                                         RightPageTemplate="{StaticResource RightPageTemplate}"
                                         FirstPagePosition="Left" IsKeyboardNavigationEnabled="True" Margin="2" />

The itemsSource is defined as follows:
Private _dagboekNotities As New ObservableCollection(Of DagboekNotitieVoorsteller)
Public Property DagboekNotities() As ObservableCollection(Of DagboekNotitieVoorsteller)
    Get
        Return _dagboekNotities
    End Get
    Set(ByVal value As ObservableCollection(Of DagboekNotitieVoorsteller))
        _dagboekNotities = value
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("DagboekNotities"))
    End Set
End Property

This collection contains 1 object a day for a period that the user selects.
If there's an odd number of items in the collection, i.e. 3 objects, then the last page is a leftpage.

I expect the book to contain the following pages:
Page1 (left) : (rightpageindex - 1) = 0
Page2 (right): rightpageindex = 1
Page3 (left): rightpageindex = 2

However, after I browse to the last page, something happens to the rightpageindex and it becomes:
Page1 (left) : (rightpageindex - 1) = -1
Page2 (right) : rightpageindex = 0
Page3 (left) : rightpageindex = 2

Am I doing something wrong?












 

Vladislav
Telerik team
 answered on 22 Oct 2012
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?