Class
FixedDocumentViewerBase

Base document viewing control that can host RadFixedDocument.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.FixedDocumentViewers.dll

Syntax:

cs-api-definition
public abstract class FixedDocumentViewerBase : Control, IFixedDocumentViewer

Inheritance: objectFixedDocumentViewerBase

Derived Classes: RadPdfViewer

Implements: IFixedDocumentViewer

Constructors

FixedDocumentViewerBase()

Initializes a new instance of the FixedDocumentViewerBase class.

Declaration

cs-api-definition
public FixedDocumentViewerBase()

Fields

CommandDescriptorsProperty

Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.CommandDescriptors property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandDescriptorsProperty

Field Value

DependencyProperty

CurrentPageNumberProperty

Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.CurrentPageNumber property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentPageNumberProperty

Field Value

DependencyProperty

DocumentProperty

Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Document property.

Declaration

cs-api-definition
public static readonly DependencyProperty DocumentProperty

Field Value

DependencyProperty

ModeProperty

Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Mode property.

Declaration

cs-api-definition
public static readonly DependencyProperty ModeProperty

Field Value

DependencyProperty

ScaleFactorProperty

Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.ScaleFactor property.

Declaration

cs-api-definition
public static readonly DependencyProperty ScaleFactorProperty

Field Value

DependencyProperty

ScaleModeProperty

Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.ScaleMode property.

Declaration

cs-api-definition
public static readonly DependencyProperty ScaleModeProperty

Field Value

DependencyProperty

SelectionFillProperty

Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.SelectionFill property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionFillProperty

Field Value

DependencyProperty

Properties

CanHorizontallyScroll

Gets the can horizontally scroll.

Declaration

cs-api-definition
public bool CanHorizontallyScroll { get; }

Property Value

bool

The can horizontally scroll.

Implements IFixedDocumentViewer.CanHorizontallyScroll

CanVerticallyScroll

Gets the can vertically scroll.

Declaration

cs-api-definition
public bool CanVerticallyScroll { get; }

Property Value

bool

The can vertically scroll.

Implements IFixedDocumentViewer.CanVerticallyScroll

CommandDescriptors

Gets or sets the command descriptors.

Declaration

cs-api-definition
public CommandDescriptors CommandDescriptors { get; set; }

Property Value

CommandDescriptors

The command descriptors.

CurrentPage

Gets the current page.

Declaration

cs-api-definition
public RadFixedPage CurrentPage { get; }

Property Value

RadFixedPage

The current page.

CurrentPageNumber

Gets or sets the current page number.

Declaration

cs-api-definition
public int CurrentPageNumber { get; set; }

Property Value

int

The current page number.

Cursors

Gets the cursors.

Declaration

cs-api-definition
public CursorsCollection Cursors { get; }

Property Value

CursorsCollection

The cursors.

Implements IFixedDocumentViewer.Cursors

DefaultImportSettings

Gets or sets the default import settings for the current FixedDocumentViewerBase. This property is used in the OpenPdfDocumentCommand.

Declaration

cs-api-definition
public PdfImportSettings DefaultImportSettings { get; set; }

Property Value

PdfImportSettings

The default import settings.

Document

Gets or sets the document for the viewer.

Declaration

cs-api-definition
public RadFixedDocument Document { get; set; }

Property Value

RadFixedDocument

The document.

Implements IFixedDocumentViewer.Document

Remarks

Instance of RadFixedDocument can be created from PdfFormatProvider class. Otherwise the DocumentSource property should be used.

DocumentSource

Gets or sets the document source for the viewer.

Declaration

cs-api-definition
public abstract FixedDocumentStreamSource DocumentSource { get; set; }

Property Value

FixedDocumentStreamSource

The document source.

FixedDocumentPresenter

Gets or sets the document presenter. The fixed document presenter is used to visualize RadFixedDocument instance.

Declaration

cs-api-definition
public IFixedDocumentPresenter FixedDocumentPresenter { get; set; }

Property Value

IFixedDocumentPresenter

The document presenter.

Implements IFixedDocumentViewer.FixedDocumentPresenter

HorizontalScrollBar

Gets the horizontal scroll bar.

Declaration

cs-api-definition
public ScrollBar HorizontalScrollBar { get; }

Property Value

ScrollBar

Implements IFixedDocumentViewer.HorizontalScrollBar

HorizontalScrollOffset

Gets the horizontal scroll offset.

Declaration

cs-api-definition
public double HorizontalScrollOffset { get; }

Property Value

double

The horizontal scroll offset.

Implements IFixedDocumentViewer.HorizontalScrollOffset

Mode

Gets or sets the mode that the FixedDocumentViewerBase class works.

Declaration

cs-api-definition
public FixedDocumentViewerMode Mode { get; set; }

Property Value

FixedDocumentViewerMode

The mode.

Implements IFixedDocumentViewer.Mode

PagesCount

Gets the number of pages of the currently loaded document.

Declaration

cs-api-definition
public int PagesCount { get; }

Property Value

int

The pages count.

RotationAngle

Gets the rotation angle.

Declaration

cs-api-definition
public RotationAngle RotationAngle { get; }

Property Value

RotationAngle

The rotation angle.

Implements IFixedDocumentViewer.RotationAngle

ScaleFactor

Gets or sets the scale factor for the viewer.

Declaration

cs-api-definition
public double ScaleFactor { get; set; }

Property Value

double

The scale factor.

Implements IFixedDocumentViewer.ScaleFactor

ScaleMode

Gets or sets the scale mode.

Declaration

cs-api-definition
public ScaleMode ScaleMode { get; set; }

Property Value

ScaleMode

The scale mode.

SelectionFill

Gets or sets the selection fill.

Declaration

cs-api-definition
public Brush SelectionFill { get; set; }

Property Value

Brush

The selection fill.

Settings

Gets or sets the settings for the RadPdfViewerBase class.

Declaration

cs-api-definition
public FixedDocumentViewerSettings Settings { get; set; }

Property Value

FixedDocumentViewerSettings

The settings.

Implements IFixedDocumentViewer.Settings

VerticalScrollBar

Gets the vertical scroll bar.

Declaration

cs-api-definition
public ScrollBar VerticalScrollBar { get; }

Property Value

ScrollBar

Implements IFixedDocumentViewer.VerticalScrollBar

VerticalScrollOffset

Gets the vertical scroll offset.

Declaration

cs-api-definition
public double VerticalScrollOffset { get; }

Property Value

double

The vertical scroll offset.

Implements IFixedDocumentViewer.VerticalScrollOffset

Methods

ClearDocument()

Clears the document.

Declaration

cs-api-definition
public void ClearDocument()

Copy()

Copies the selected text in the Clipboard.

Declaration

cs-api-definition
public void Copy()

Find(string)

Finds next match for the specified text in the current document.

Declaration

cs-api-definition
public SearchResult Find(string text)

Parameters

text

string

The text.

Returns

SearchResult

The result.

Find(string, TextSearchOptions)

Finds next match for the specified text in the current document using specified options.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options)

Parameters

text

string

The text.

options

TextSearchOptions

The options.

Returns

SearchResult

The result.

FindAll(string)

Finds all matches for the specified text in the current document.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text)

Parameters

text

string

The text.

Returns

IEnumerable<SearchResult>

FindAll(string, TextSearchOptions)

Finds all matches for the specified text in the current document using specified options.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)

Parameters

text

string

The text.

options

TextSearchOptions

The options.

Returns

IEnumerable<SearchResult>

FindPrevious(string)

Finds the previous text in the current document.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text)

Parameters

text

string

The text.

Returns

SearchResult

FindPrevious(string, TextSearchOptions)

Finds the previous text in the current document using specified options.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options)

Parameters

text

string

The text.

options

TextSearchOptions

The options.

Returns

SearchResult

FitToPage()

Fits FixedDocumentViewerBase content to page size.

Declaration

cs-api-definition
public void FitToPage()

FitToWidth()

Fits FixedDocumentViewerBase content to page width.

Declaration

cs-api-definition
public void FitToWidth()

GetRegisteredPresenter(string)

Gets the registered presenter.

Declaration

cs-api-definition
public IFixedDocumentPresenter GetRegisteredPresenter(string presenterName)

Parameters

presenterName

string

Name of the presenter.

Returns

IFixedDocumentPresenter

GetSelectedText()

Gets the selected text.

Declaration

cs-api-definition
public string GetSelectedText()

Returns

string

GetSelectedTextAsync()

Gets the selected text asynchronously.

Declaration

cs-api-definition
public Task<string> GetSelectedTextAsync()

Returns

Task<string>

GoToDestination(Destination, bool)

Goes to given destination.

Declaration

cs-api-definition
public void GoToDestination(Destination destination, bool syncBookmark = true)

Parameters

destination

Destination

The destination.

syncBookmark

bool

If set to true the SyncCurrentBookmarkItemCommand is executed as well.

GoToPage(int)

Goes to specified page.

Declaration

cs-api-definition
public void GoToPage(int pageNo)

Parameters

pageNo

int

The page number.

HasRegisteredPresenter(string)

Determines whether [has registered presenter] [the specified presenter name].

Declaration

cs-api-definition
public bool HasRegisteredPresenter(string presenterName)

Parameters

presenterName

string

Name of the presenter.

Returns

bool

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnDocumentChangedOverride(RadFixedDocument, RadFixedDocument)

Called when the document is changed.

Declaration

cs-api-definition
protected virtual void OnDocumentChangedOverride(RadFixedDocument oldValue, RadFixedDocument newValue)

Parameters

oldValue

RadFixedDocument

The old value.

newValue

RadFixedDocument

The new value.

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

PageDown()

Goes a page down.

Declaration

cs-api-definition
public void PageDown()

PageUp()

Goes a page up.

Declaration

cs-api-definition
public void PageUp()

Print()

Prints the current document using the default print settings.

Declaration

cs-api-definition
public void Print()

Print(PrintDialog, PrintSettings)

Prints with the specified print dialog. The dialog should already be initialized.

Declaration

cs-api-definition
public void Print(PrintDialog printDialog, PrintSettings settings)

Parameters

printDialog

PrintDialog

The print dialog. .

settings

PrintSettings

The print settings.

Print(PrintSettings)

Prints the current document.

Declaration

cs-api-definition
public void Print(PrintSettings settings)

Parameters

settings

PrintSettings

The print settings.

RegisterPresenter(string, IFixedDocumentPresenter)

Registers the presenter.

Declaration

cs-api-definition
public void RegisterPresenter(string presenterName, IFixedDocumentPresenter presenter)

Parameters

presenterName

string

Name of the presenter.

presenter

IFixedDocumentPresenter

The presenter.

ScrollToHorizontalOffset(double)

Scrolls to horizontal offset.

Declaration

cs-api-definition
public void ScrollToHorizontalOffset(double offset)

Parameters

offset

double

The offset.

Implements IFixedDocumentViewer.ScrollToHorizontalOffset(double)

ScrollToVerticalOffset(double)

Scrolls to vertical offset.

Declaration

cs-api-definition
public void ScrollToVerticalOffset(double offset)

Parameters

offset

double

The offset.

Implements IFixedDocumentViewer.ScrollToVerticalOffset(double)

Select(TextPosition, TextPosition)

Creates selection from start position to end position.

Declaration

cs-api-definition
public void Select(TextPosition startPosition, TextPosition endPosition)

Parameters

startPosition

TextPosition

The start position.

endPosition

TextPosition

The end position.

Select(TextRange)

Selects the specified range.

Declaration

cs-api-definition
public void Select(TextRange range)

Parameters

range

TextRange

The range.

SetDocumentSource(FixedDocumentStreamSource)

Sets the document source.

Declaration

cs-api-definition
protected virtual void SetDocumentSource(FixedDocumentStreamSource source)

Parameters

source

FixedDocumentStreamSource

The source.

SetRotationAngle(RotationAngle)

Sets the rotation angle.

Declaration

cs-api-definition
public void SetRotationAngle(RotationAngle rotationAngle)

Parameters

rotationAngle

RotationAngle

The rotation angle.

UpdatePresenterLayout()

Updates the current presenter layout.

Declaration

cs-api-definition
public void UpdatePresenterLayout()

Events

AnnotationClicked

Occurs when annotation is clicked.

Declaration

cs-api-definition
public event EventHandler<AnnotationEventArgs> AnnotationClicked

Event Value

EventHandler<AnnotationEventArgs>

CurrentPageChanged

Occurs when the current page is changed.

Declaration

cs-api-definition
public event EventHandler<CurrentPageChangedEventArgs> CurrentPageChanged

Event Value

EventHandler<CurrentPageChangedEventArgs>

DocumentChanged

Occurs when the PDF document is changed.

Declaration

cs-api-definition
public event EventHandler<DocumentChangedEventArgs> DocumentChanged

Event Value

EventHandler<DocumentChangedEventArgs>

Implements IFixedDocumentViewer.DocumentChanged

FixedDocumentPresenterChanged

Occurs when [fixed document presenter changed].

Declaration

cs-api-definition
public event EventHandler FixedDocumentPresenterChanged

Event Value

EventHandler

HyperlinkClicked

Occurs when the hyperlink is clicked.

Declaration

cs-api-definition
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked

Event Value

EventHandler<HyperlinkClickedEventArgs>

Implements IFixedDocumentViewer.HyperlinkClicked

ModeChanged

Occurs when the mode is changed.

Declaration

cs-api-definition
public event EventHandler ModeChanged

Event Value

EventHandler

ScaleFactorChanged

Occurs when the scale factor is changed.

Declaration

cs-api-definition
public event EventHandler<ScaleFactorChangedEventArgs> ScaleFactorChanged

Event Value

EventHandler<ScaleFactorChangedEventArgs>

Implements IFixedDocumentViewer.ScaleFactorChanged

ScaleModeChanged

Occurs when the scale mode is changed.

Declaration

cs-api-definition
public event EventHandler ScaleModeChanged

Event Value

EventHandler