Telerik Forums
UI for WPF Forum
1 answer
57 views

I think to create a contact form created from five different HTML webpages:

Four HTML webpages would prompt the user for various kinds of data and the fifth webpage would include a submit button and a success message in case a submit process went well form JavaScript’s side at least — not involving possible problems in the backend (PHP) routing.

My problem is that I don’t know almost anything about Ajax:
Ajax CRUD operation codes always seemed to me very long and complicated; perhaps since EcmaScript 2021 Ajax CRUD operations could be much simpler.

I seek some guidance about how to generally do this, how to save data prompted from the user in each of the four HTML documents) and so forth.

Martin Ivanov
Telerik team
 answered on 08 Jul 2021
3 answers
69 views
Hi,
 I load an arabic DOCX files in RichTextBox that integrate with RadBook. 
But when it loaded, it show all RTL Text in LTR Format. How i can fix it?
Hazim
Top achievements
Rank 1
Veteran
 answered on 27 Jun 2020
2 answers
63 views

Hi,

       I am implementing an app using RadBook. I am using data templates to bind the data. When the data is more than the page height, i want to avoid the page scroll and port that overflown data in to the next page.

Attaching images to show how i want the data to be spilt in to two pages. Right now, entire data is shown up in a single page with a scrolling.

Is there a method available with Radbook to attain this? If not, what are the alternate solutions i can try to achieve this effect.

Thanks in advance

 

regards

P A Naidu

 

Naidu
Top achievements
Rank 1
 answered on 24 Jun 2016
1 answer
198 views

design a simple (no fancy/shining color change), comfortable, friendly (easy-to-use) user interface for a WPF desktop application (by MVVM pattern) by C# in VS2013 on win 7

I would like to design a WPF desktop application by C# in VS2013 on win 7.

I need to design an UI look like this attached example blow. I have checked the WPF toolbox in VS2013, I do not find a layout template that can provide an UI like this.

In order to design a simple, comfortable and friendly (easy-to-use) user interface, I have checked the links :

       prism http://compositewpf.codeplex.com/
        http://stackoverflow.com/questions/2135092/creating-a-nice-gui-in-wpf>
        http://ux.stackexchange.com/questions/10776/where-can-i-find-a-gallery-of-wpf-ui-examples

But, they are not a good fit for my application.

I need a user interface :
      1. some tool menus on the top such as "File", "Edit", "project", "tool" , "help", which look much like the most popular UI style in MS office tools.
      2. some shortcut icons for some hot uses below the tool menu
      3. The  left panel are separated into 3 parts : left, middle, right
      4.  Each part size can be changed by holding the vertical separator
      5 . Each part is separated into 2 vertical parts
      6. In left-upper part, there some tree-view buttons, when a button is clicked, a detailed subtree buttons are shown at the left-lower part.
     7. In the middle part, some data chart, tables, curves are shown at the upper-part and the related detailed data are shown at the lower-part.
     8. In the middle part, I need multiple tabs to show the data and charts
     9. In the right-part, it holds some animations related to the data shown in the middle part.
     10. the color of the application should be consistent, simple and flat (not much gradient change, e.g. ligth-gray is fine), not so fancy like prism.

Are there some templates similar like this ? 

Any suggestions ? Thanks !

 

Martin Ivanov
Telerik team
 answered on 13 Apr 2016
1 answer
78 views

Hi.

I want to use pdf integrated RadBook.

but this is important to having a ToolBar for Paging, zooming, Panning.

please tell me the best APIs, Controls, Senario, ...... 

Thanks.

Martin Ivanov
Telerik team
 answered on 14 Jul 2015
1 answer
70 views

Hi

I'm using RadBook and Pdf viewer as follow:

 Xaml Code:

<UserControl.Resources>
    <DataTemplate x:Key="LeftPageTemplate">
        <Viewbox>
            <Grid>
                <UI:FixedDocumentSinglePagePresenter Page="{Binding}"  Width="325" Height="447" FlowDirection="LeftToRight"/>
                <hosts:DrawingCanvas  Width="325" Height="447" Margin="15" Background="#00000000" FlowDirection="LeftToRight" />
            </Grid>
        </Viewbox>
    </DataTemplate>
</UserControl.Resources>
 
<telerik:RadBusyIndicator x:Name="BusyIndicator">
    <telerik:RadBook x:Name="book"
                 LeftPageTemplate="{StaticResource LeftPageTemplate}"
                 RightPageTemplate="{StaticResource LeftPageTemplate}"
                 IsVirtualizing="True"
                 IsKeyboardNavigationEnabled="True"
                 HorizontalAlignment="Center"
                 VerticalAlignment="Center"
                 FirstPagePosition="Right"
                 HardPages="None"
                 Margin="10"
                 BorderThickness="1"
                  BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
</telerik:RadBusyIndicator>

C# Code:

public void LoadFile(Stream stream)
{
    BusyIndicator.IsBusy = true;
 
    var UISyncContext = TaskScheduler.FromCurrentSynchronizationContext();
 
    var task = new Task<RadFixedDocument>(() => LoadPdf(stream));
    task.ContinueWith(t =>
    {
        book.ItemsSource = t.Result.Pages;
        TotalPages = t.Result.Pages.Count;
 
        BusyIndicator.IsBusy = false;
 
    }, UISyncContext);
    task.Start();
}
 
private RadFixedDocument LoadPdf(Stream stream)
{
    return new PdfFormatProvider(stream, FormatProviderSettings.ReadOnDemand).Import();
}

Everything seems to work fine!

But the problem is when I Load a file and start browsing pages, and monitor it on Task Manager, memory grows too high (i.e. more than 2GB)

Look at the attached files, one from Task manager and one from ANTS Memory Profiler!

 What's wrong with my code? Should I do some extra work like releasing objects, pages, ... any thing!?

Peshito
Telerik team
 answered on 10 Apr 2015
1 answer
47 views
Hi
I'm trying to using RadBook control to display a PDF file and also a custom control named DrawingCanvas to draw some shapes over the PDF file loaded.
I've done this successfully thanks to the vast amount of samples available.
Here is how I do:

I load the file as follows:
private void LoadFile(String filePath)
{
    documentStream = new FileStream(filePath, FileMode.Open);
    var doc = new PdfFormatProvider(documentStream, FormatProviderSettings.ReadOnDemand).Import();
    book.ItemsSource = doc.Pages;
}

And here is the DataTemplate which I use:
<DataTemplate x:Key="PageTemplate">
            <Viewbox>
                     <Grid>
                    <ui:FixedDocumentSinglePagePresenter Page="{Binding}" Width="500" Height="500"/>
                    <hosts:DrawingCanvas Width="500" Height="500" Margin="15" Background="#00000000" />
                </Grid>
            </Viewbox>
        </DataTemplate>
And everything works great.
My problem is that, when the page is changed (on PageChanged event), I want to access the DrawingCanvas!
I tries the 2 approaches mentioned in this post How to access controls in RadBook DataTemplete?, but it doesn't help me.
When using the loaded event, I have 2 problems:
  1. When paging back, the events (sometimes) does not raise!
  2. It seems the RadBook caches the pages, so while RightPageIndex is 0, I get events of canvases in page 1 and 2.

And when trying to use the RadBook.ItemContainerGenerator the problem is that myBook.ItemContainerGenerator.ContainerFromIndex(leftPageInd) returns null,
and I also tried to use the book.Items property, but my Items type are RadFixedPage (because I've set ItemsSource of book to PdfFormatProvider's Pages property) and I don't know how can I use it to get my DrawingCanvas.

Regards, Vahid 

Martin Ivanov
Telerik team
 answered on 15 Dec 2014
9 answers
45 views
Hi,
I have radbook which itemsource is ObservableCollection of objects of type BookPage (my object). I also have listbox with itemsource also connected with same ObservableCollection. What I try to accomplish is to use ListBox as Table of Content and to jump to particular page using it, and book pages should follow order of items in listBox. Everything works fine when I am adding or removing items in ListBox, but when I try to reorder items in listbox, sometimes one or two pages in book are lost, or to be absolutely precise, items in listbox are on correct places, pages are still in book, but I can not see them. (strange effect is showing: when I am flipping through book, that "lost" pages are "showing from nothing" and disapear to nothing  - pages are blank, I can not see any content on them. Can you suggest some solution to this problem, I suspect that something must be done with Collection, but can not figure  out what and how. Listbox always looks fine, 
Thanks in advance
Nebojsa Danilovic
Martin Ivanov
Telerik team
 answered on 22 Jan 2014
2 answers
56 views
Hi,
is it possible to have a book as combination of my custom defined pages(cover page and last page) and in between to have pdf content (like in pdf radbook integration example).
best regards
Nebojsa Danilovic 
Nebojsa
Top achievements
Rank 1
 answered on 16 Jan 2014
1 answer
70 views
Hy,

In radbook template i would to add a simply close button with its click event to close the control itself
How i can this? There is any code sample?

Many thanks :)
Tina Stancheva
Telerik team
 answered on 16 Oct 2013
Narrow your results
Selected tags
Tags
+? more
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?
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?