Class DocumentViewerBase
Interaction logic for DocumentViewerBase.xaml
Namespace: Simplic.Framework.DBUI
Assembly: Simplic.Framework.DBUI.dll
Syntax
public class DocumentViewerBase : UserControl, IDocumentViewer
Constructors
| Improve this Doc View SourceDocumentViewerBase()
Constructor
Declaration
public DocumentViewerBase()
Properties
| Improve this Doc View SourceDocumentExtension
Declaration
public virtual string DocumentExtension { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
DocumentIsLoaded
True if a document is loaded
Declaration
protected bool DocumentIsLoaded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Extension
Contains the file extension with dot
Declaration
public string Extension { get; }
Property Value
Type | Description |
---|---|
System.String |
MailButton
Get the mail-button instance
Declaration
protected Button MailButton { get; }
Property Value
Type | Description |
---|---|
Button |
OriginalDocument
Declaration
public virtual byte[] OriginalDocument { get; protected set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
PageNumberChangedProgramatically
page number changed within the code
Declaration
protected bool PageNumberChangedProgramatically { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PreparedDocument
Declaration
public virtual byte[] PreparedDocument { get; protected set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
PrintButton
Get the print button instance
Declaration
protected Button PrintButton { get; }
Property Value
Type | Description |
---|---|
Button |
SaveButton
Get the save-button instance
Declaration
protected Button SaveButton { get; }
Property Value
Type | Description |
---|---|
Button |
Viewer
Viewer instance
Declaration
public GdViewer Viewer { get; set; }
Property Value
Type | Description |
---|---|
GdViewer |
Methods
| Improve this Doc View SourceAfterPageChanged()
gets called after the current page changed, used to control default document viewer behavior
Declaration
protected virtual void AfterPageChanged()
Clear()
Clear the viewer
Declaration
public void Clear()
Dispose()
Dispose object and free viewer memory
Declaration
public void Dispose()
HideAnnotationUI()
Declaration
public void HideAnnotationUI()
OnAfterDocumentChange()
Document is loaded into the viewer
Declaration
protected virtual void OnAfterDocumentChange()
OnCurrentPageChanged()
called when the current page textbox changed
Declaration
protected virtual void OnCurrentPageChanged()
OnPageChanged(Int32, Int32)
Declaration
protected void OnPageChanged(int oldPageNumber, int newPageNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | oldPageNumber | |
System.Int32 | newPageNumber |
OnPageEnd()
display last page
Declaration
protected virtual void OnPageEnd()
OnPageLeft()
display previous page
Declaration
protected virtual void OnPageLeft()
OnPageRight()
display next page
Declaration
protected virtual void OnPageRight()
OnPageStart()
display first page
Declaration
protected virtual void OnPageStart()
OnPrint()
Print current document
Declaration
protected virtual void OnPrint()
OnSave()
Save
Declaration
protected virtual void OnSave()
OnSendMail()
Send mail
Declaration
protected virtual void OnSendMail()
Show(Byte[], String, Guid, String, Byte[])
Show a document in the viewer and enable annotations
Declaration
public void Show(byte[] blob, string fileType, Guid blobId, string viewername, byte[] originalDocument = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | blob | |
System.String | fileType | |
Guid | blobId | |
System.String | viewername | viewername |
System.Byte[] | originalDocument |
Show(Byte[], String, Byte[])
Show a document in the viewer
Declaration
public void Show(byte[] viewerPreparedDocument, string extension, byte[] originalDocument)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | viewerPreparedDocument | Document as byte-array |
System.String | extension | Extension as string |
System.Byte[] | originalDocument | Original document |
ShowAnnotationUI()
Declaration
public void ShowAnnotationUI()
Events
| Improve this Doc View SourcePageChangedEvent
fires when the page of the document changed
Declaration
public event DocumentViewerBase.PageChangedEventHandler PageChangedEvent
Event Type
Type | Description |
---|---|
DocumentViewerBase.PageChangedEventHandler |