Telerik Forums
UI for WPF Forum
1 answer
83 views
First, I'm a beginner. I saw the examples/demos but all asume that the list of pages for the book is hardcoded in the program. How to make a book that can load any number of pictures by simply placing those pictures in a folder? Or, better, if those files are listed in a text file or xml file how to read from this file and load the items in the book.
Another issue: In the binding example you are using a xmlns:viewModels="clr-namespace:Telerik.Windows.Examples.Book.Binding". Durring build I get an error about that line (I have exacly the same lines of code as your example and added the same pictures in the project). Can you help me find what I'm missing?
Petar Mladenov
Telerik team
 answered on 04 Jul 2012
1 answer
155 views
Hello,
I purchase an HP touchSmart PC, I would like to know if I have a WPF application with telerik components (Book) does it works on the Touch PC? I mean what is the behaviour of the Book component, can i open the book and zoom it with fingers?
thanks
Tina Stancheva
Telerik team
 answered on 13 Mar 2012
3 answers
94 views
It seems that the FlipDuration property of the RadBook control is only taken into account when the user has initiated a page turn.

When using the method .NextPage or setting the property .RightPageIndex the flip duration is not used. Is this by design?

Is there a way to slow down a page turn when using .NextPage or .RightPageIndex?

Thanks,

Jim
Kiril Stanoev
Telerik team
 answered on 06 Feb 2012
1 answer
120 views
I have saved files from a data base then used the paths to bind them to my images in my book. But now I need to release those images and rebind with different images. I am not able to delete out the image files that I created to display from the first book that was created. How do I clear the locks on the files so I can recreate them from other images in the database?

 

 

 

 

private void Process_Tiff(BookView wpfbook, string TempFile)
{
    RemoveOldFiles();
    //Sets each page to an image
    Image img = Image.FromFile(TempFile);
    int count = img.GetFrameCount(FrameDimension.Page);
    List<BookItem> MyBook = new List<BookItem>();
    for (int idx = 0; idx < count; idx++)
    {
        img.SelectActiveFrame(FrameDimension.Page, idx);
        int currentpage = idx + 1;
        string TempPageFile = DefaultPath + DocOcc.ToString() + currentpage.ToString() + ".TIFF";
        // and then create a new Image from it
        img.Save(TempPageFile);
        dFile df = new dFile();
        df.File_Path = TempPageFile;
        FileList.Add(df);
        MyBook.Add(new BookItem()
        {
            Title = TempPageFile
        });
    }
    img.Dispose();
    wpfbook.RadBook1.ItemsSource = MyBook;
}

This is the code where I create a file for each page of my Tiff file. Then I use this code to try and remove it. But I am not able to remove the file.

private void RemoveOldFiles()
{
    ((BookView)((ElementHost)panel1.Controls[0]).Child).RadBook1.ItemsSource = null;
    int count = 0;
    IList<dFile> holddf = new List<dFile>();
    foreach (dFile dfrow in FileList)
   {
       try
       {
           File.Delete(dfrow.File_Path);
           count++;
       }
       catch
       {
           dFile df = new dFile();
           df.File_Path = dfrow.File_Path;
           holddf.Add(df);
           count++;
       }
   }
    FileList = holddf;
}

The result is always faling in to the Catch and the error is always that the file is in use. Hopefully this helps someone help me.

Petar Mladenov
Telerik team
 answered on 03 Feb 2012
1 answer
93 views
Hi TT,
I'm making an application to surface in wpf.
For this application, I need to instantiate more than one book and there are no problems.
But if I try to browse through more than one book at the same time (such as surface allows), it only works one at a time. To be precise, only works that you are flipping through the book and nothing else.
Is there a way to solve this problem?

Thank you for helping
Chianco
Petar Mladenov
Telerik team
 answered on 26 Jan 2012
11 answers
308 views
HI.

What are the different sources that can be used for the RadBook? I know that you can use images, but what else?.
Can you use a word/ppt/pdf document as a source? Up to now, I had to convert all pages to images, load them in an observable collection, and point the collection as the source for the RadBook.

Can I assign a word document as a source, without doing any conversions?

Regards

Eduan
Роберт
Top achievements
Rank 1
 answered on 23 Jan 2012
1 answer
53 views
If I just want to have the right page, would that be possible?
Petar Mladenov
Telerik team
 answered on 03 Jan 2012
1 answer
78 views
i import a docx into a RADbook with Rich textbox.

it show hyper link to current document but don't move to bookmark line?
Iva Toteva
Telerik team
 answered on 07 Dec 2011
3 answers
110 views

Hi,

in my application I have a RadBook which receive as an ItemsSource a collection of memo's. I would like to know if it's possible to have on the first page only the flexibility to edit the memo?

Thank's
Tina Stancheva
Telerik team
 answered on 18 Nov 2011
3 answers
186 views

Hi, there.
I think RadBook is a great component for document viewer.
The problem is that I need to change the Width and Height of the viewer and the contents need to reformat the pages to fit in.
I tested code based on "RadBookIntegration" sample by adding the follwoing code.

       private void RadButtonIncrease_Click(object senderRoutedEventArgs e)
        {
            RadDocument doc = this.viewManager.Document;
            doc.DefaultPageLayoutSettings.Width += 50;
            doc.DefaultPageLayoutSettings.Height += 50;
            doc.UpdateLayout();
        }
        private void RadButtonDecrease_Click(object senderRoutedEventArgs e)
        {
            RadDocument doc = this.viewManager.Document;
            doc.DefaultPageLayoutSettings.Width -= 50;
            doc.DefaultPageLayoutSettings.Height -= 50;
            doc.UpdateLayout();
        }

I believe UpdateLayout should reformat the contents but the result is not what I expected;  page numbers and contents gets duplicated.
Can you please tell me what I'm doing wrong?

Thanks for your help.

Mike
Telerik team
 answered on 02 Sep 2011
Narrow your results
Selected tags
Tags
+112 more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?