Members Example





In This Topic
GdPicture14.WPF Namespace / GdViewer Class

GdViewer Class

In This Topic
The GdViewer class is designed to fully automate most viewing operations you require. The instance of this class can be used as an image viewer control to view supported files, images, PDF documents, as well as easily zoom, rotate, define display area, print or even create thumbnails of those loaded documents.

Please, be aware that GdViewer is developed to handle documents, specifically images, in read-only mode. As its name says, it is only a viewer by the definition.

Syntax
'Declaration
 
<StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public NotInheritable Class GdViewer 
   Inherits System.Windows.Controls.Control
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public sealed class GdViewer : System.Windows.Controls.Control 
public class GdViewer = class(System.Windows.Controls.Control)sealed; 
StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)
XmlLangPropertyAttribute("Language")
UsableDuringInitializationAttribute()
RuntimeNamePropertyAttribute("Name")
UidPropertyAttribute("Uid")
TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)
NameScopePropertyAttribute("NameScope", System.Windows.NameScope)
public sealed class GdViewer extends System.Windows.Controls.Control
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public __gc __sealed class GdViewer : public System.Windows.Controls.Control 
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public ref class GdViewer sealed : public System.Windows.Controls.Control 
Remarks
Please try the Document Viewer Sample in your [INSTALLATION FOLDER]/Samples/WPF folder to fully see, how to create, integrate and use the GdViewer control in your application.

Likewise, be aware that GdViewer is only a viewer by the definition. If you want to properly deal with images, for example, to rotate page and subsequently save the image, please use the GdPicture14.GdPictureImaging class instead.

Example
How to create and integrate the GdViewer control into your application.
'Define GdViewer object in your application.
Friend WithEvents GdViewer1 As GdViewer
            
'Create an instance.
GdViewer1 = New GdViewer()
            
'Set your preferred properties here.
GdViewer1.Name = "GdViewer1"
'...
            
'Add to your application controls.
Controls.Add(GdViewer1)
            
'Probably the GdViewer1 instance is disposed of automatically in your application,
'but you can still do it this way.
'GdViewer1.Dispose()
//Define GdViewer object in your application.
internal GdViewer GdViewer1;
            
//Create an instance.
GdViewer1 = new GdViewer();
            
//Set your preferred properties here.
GdViewer1.Name = "GdViewer1";
//...
            
//Add to your application controls.
Controls.Add(GdViewer1);
            
//Probably the GdViewer1 instance is disposed of automatically in your application,
//but you can still do it this way.
//GdViewer1.Dispose();
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     GdPicture14.WPF.GdViewer

See Also