I'm using Leadtools SDK to build an C# WPF application that opens and shows PDF files.
At the mommet I only have two requirements:
Continuous scroll (like in Adobe Reader)
Zoom in/out
I'm having a hard time trying to figure out which is the right control for this. These are the main controls that Leadtools gives me:
ImageViewer
ImageList
RasterImageViewer
Since I want to scroll all PDF pages I'm using ImageList control. This control is able to show multiple pages but it doesn't have any properties like ScaleFactor to control the zoom.
ImageViewer and RasterImageViewer both have ScaleFactor but they lack the ability to show multiple pages, they only show one at a time.
Which control is the right one for my scenario? And how to approch it?
We have posted a simple WPF demo that displays continuous multiple pages using the Leadtools.Controls.RasterImageViewer control.
This control is the same one used in the AnnotationsLayersDemo shipped with version 19 of LEADTOOLS and it is derived from the ImageViewer control. Both controls are implemented in the Leadtools.Controls.Wpf assembly.
The simple demo can be found here: http://support.leadtools.com/SupportPortal/CS/forums/44682/ShowPost.aspx#44682
Related
I have a requirement where I have to code Powerpoint to access data from sql server and display in tabular and graphical manner. Instead of doing it in VBA (as i'm weak in VBA) I would prefer to go with WPF Window application in C#.
My question is, Is that possible to create Powerpoint presentation like slide show in WPF where on every slide there will be graph and datagrid and marquee text show updated data from database. Any suggestion or links highly appreciated.
So far What I've found:
1) If I make my windowstyle to none and state to maximized. it will appear in full screen window.
this.WindowStyle = WindowStyle.None;
this.WindowState = System.Windows.WindowState.Maximized;
2) and on Each window by using dockpanel I can arrange controls like datagrid on leftside and graph on right side and in bottom marquee text.
3) Using timer switching between each windows.
with these I might be able to achieve what I'm looking for but is there any better solution for this?
I found a really useful library that you can use for this purpose. It features many different transitions, just like PowerPoint and is really easy to use. It is called 'Transitionals' and you can download it from the CodePlex website:
Transitionals
UPDATE >>>
This Transitionals library is now on version 1.2, but you can download the help file for version 1.0 by clicking on the 'TransitionalsHelp_1_0.zip' link on this page on CodePlex.
Does anyone know of a C# WinForm or WPFcomponent that I can use as a "Word-Blank-page" control?
I need that the my user at runtime see a whit-blank-page that can manipulate by having basic text editing (bold, fonts, color), basic tables and images placed everywhere on the "canvas" (the white page).
The component should give me an API, so I can react on user actions on the component, like when right clicking on table or an image (I will display different forms depending on the object clicked).
I look for some extension of the RichTextEdit control from different vendors, but any of those can give me the functionality I need.
Any suggestion is welcome.
Flow documents is a good way to go. They are thoroughly documented by Microsoft.
They provide all the functionality you mentioned and then some. Code Project has some good examples on how to use flow documents. You can check this beginners guide for starters.
I've created an WPF based application showing me thumbnails of external windows. As an example i pick up icq, firefox and some other windows, create thumbnails of these and render them onto my WPF based application.
That works fine already and looks like this:
http://img560.imageshack.us/img560/1170/oijoijio.jpg
(Just showing one thumbnail in here, but there will be multiple in future)
The WPF application will also contain some controls to actually select the windows being "thumbnailed" and a few others.
The next step and my actual question is about how i would redirect these content being rendered into a Bitmap instead of the "WPF window" itself.
Is there a way to accomblish that goal? All the windows content (WPF containers and the drawn thumbnails) need to be rendered into a bitmap which i can display in directx window being owned by a game.
I know that it is possible todo that somehow, as a programm called overwolf also uses WPF inside of their application. They actually install device inline detours to hook into the rendering process of the game, where they render their wpf content. I am not sure if they use some kind of bitmap they render in there, or if they directly render the wpf content onto the dx-surface somehow.
Other ideas besides the bitmap based style i plan to go for are welcome aswell!
Thanks for your reading until here, and another big hug for any answer :)
Any WPF Visual object can be rendered into a bitmap using RenderTargetBitmap.
When the user clicks a button in my C# app I want to show him bunch of images so that he can pick one. I don't want to do it with file browser, I want him to be able to view little thumbnails of the images so that he sees what he is picking.
Is there any control I can use to do this?
Thanks
If you are refering to a WinForms control, I would recommend the free ImageListView control.
Works very well in my own real-world projects. Plus, the author is very responsive and the control seems to have a very high overall code and design quality.
You will need to create custom code. Or you can use a WYSIWYG Editor.
Here are 2 popular ones for .NET.
http://www.tinymce.com/
http://ckeditor.com/
Create multiple PictureBox-es in a grid formation in the form that you are creating.
Display one thumbnail in each PictureBox.
I am usually against PictureBox control usage, but in this case, you can't miss.
I've created a WPF application which has a Canvas on which I place UserControls which are moveable and resizeable by the user (just like a Windows-Window). Now I have detected that this can be very slow on older PC's which is a problem.
As a solution I thought about generating a graphic showing the UserControl and show this while resizing/dragging the Control, to prevent WPF from recalculating all Elements permanently. The only problem is that I have no idea how to generate this image.
Is there perhaps something like a function which does this in .Net? Or how could I do this on my own?
You can render a WPF control to a bitmap using RenderTargetBitmap, then this image can be copied to the clipboard, saved to a file, or used as part of your GUI
Check out Get a bitmap image from a Control view
Beware with this that you can hit problems when parts of the control you are trying to render are not visible (within a scroll viewer perhaps)
WPF applications really do require some fairly serious grunt; particularly in the graphics department and benefit greatly from having a decent video card present in the system. Even then the performance of WPF apps (if not carefully constructed) can leave much to be desired...
That said, you could feasibly use FixedDocument to rasterise a UserControl, and then convert this into a GIF/JPG/PNG and put this in place of the control being resized... however I would expect that process itself to be as slow or slower than your current observed performance issues.