New to Telerik UI for WPFStart a free 30-day trial

Base document viewing control that can host RadFixedDocument.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.FixedDocumentViewers.dll

Syntax:

C#
public abstract class FixedDocumentViewerBase : Control, IFixedDocumentViewer

Inheritance: objectFixedDocumentViewerBase

Derived Classes: RadPdfViewer

Implements: IFixedDocumentViewer

Constructors

Initializes a new instance of the FixedDocumentViewerBase class.

C#
public FixedDocumentViewerBase()

Fields

CommandDescriptorsProperty

DependencyProperty

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

C#
public static readonly DependencyProperty CommandDescriptorsProperty

CurrentPageNumberProperty

DependencyProperty

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

C#
public static readonly DependencyProperty CurrentPageNumberProperty

DocumentProperty

DependencyProperty

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

C#
public static readonly DependencyProperty DocumentProperty

ModeProperty

DependencyProperty

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

C#
public static readonly DependencyProperty ModeProperty

ScaleFactorProperty

DependencyProperty

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

C#
public static readonly DependencyProperty ScaleFactorProperty

ScaleModeProperty

DependencyProperty

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

C#
public static readonly DependencyProperty ScaleModeProperty

SelectionFillProperty

DependencyProperty

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

C#
public static readonly DependencyProperty SelectionFillProperty

Properties

Gets the can horizontally scroll.

C#
public bool CanHorizontallyScroll { get; }
Property Value:

The can horizontally scroll.

Implements: IFixedDocumentViewer.CanHorizontallyScroll

Gets the can vertically scroll.

C#
public bool CanVerticallyScroll { get; }
Property Value:

The can vertically scroll.

Implements: IFixedDocumentViewer.CanVerticallyScroll

Gets or sets the command descriptors.

C#
public CommandDescriptors CommandDescriptors { get; set; }
Property Value:

The command descriptors.

CurrentPage

RadFixedPage

Gets the current page.

C#
public RadFixedPage CurrentPage { get; }
Property Value:

The current page.

Gets or sets the current page number.

C#
public int CurrentPageNumber { get; set; }
Property Value:

The current page number.

Gets the cursors.

C#
public CursorsCollection Cursors { get; }
Property Value:

The cursors.

Implements: IFixedDocumentViewer.Cursors

DefaultImportSettings

PdfImportSettings

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

C#
public PdfImportSettings DefaultImportSettings { get; set; }
Property Value:

The default import settings.

Document

RadFixedDocument

Gets or sets the document for the viewer.

C#
public RadFixedDocument Document { get; set; }
Property Value:

The document.

Implements: IFixedDocumentViewer.Document

Remarks:

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

Gets or sets the document source for the viewer.

C#
public abstract FixedDocumentStreamSource DocumentSource { get; set; }
Property Value:

The document source.

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

C#
public IFixedDocumentPresenter FixedDocumentPresenter { get; set; }
Property Value:

The document presenter.

Implements: IFixedDocumentViewer.FixedDocumentPresenter

Gets the horizontal scroll bar.

C#
public ScrollBar HorizontalScrollBar { get; }

Implements: IFixedDocumentViewer.HorizontalScrollBar

Gets the horizontal scroll offset.

C#
public double HorizontalScrollOffset { get; }
Property Value:

The horizontal scroll offset.

Implements: IFixedDocumentViewer.HorizontalScrollOffset

Gets or sets the mode that the FixedDocumentViewerBase class works.

C#
public FixedDocumentViewerMode Mode { get; set; }
Property Value:

The mode.

Implements: IFixedDocumentViewer.Mode

Gets the number of pages of the currently loaded document.

C#
public int PagesCount { get; }
Property Value:

The pages count.

Gets the rotation angle.

C#
public RotationAngle RotationAngle { get; }
Property Value:

The rotation angle.

Implements: IFixedDocumentViewer.RotationAngle

Gets or sets the scale factor for the viewer.

C#
public double ScaleFactor { get; set; }
Property Value:

The scale factor.

Implements: IFixedDocumentViewer.ScaleFactor

ScaleMode

ScaleMode

Gets or sets the scale mode.

C#
public ScaleMode ScaleMode { get; set; }
Property Value:

The scale mode.

Gets or sets the selection fill.

C#
public Brush SelectionFill { get; set; }
Property Value:

The selection fill.

Gets or sets the settings for the RadPdfViewerBase class.

C#
public FixedDocumentViewerSettings Settings { get; set; }
Property Value:

The settings.

Implements: IFixedDocumentViewer.Settings

Gets the vertical scroll bar.

C#
public ScrollBar VerticalScrollBar { get; }

Implements: IFixedDocumentViewer.VerticalScrollBar

Gets the vertical scroll offset.

C#
public double VerticalScrollOffset { get; }
Property Value:

The vertical scroll offset.

Implements: IFixedDocumentViewer.VerticalScrollOffset

Methods

Clears the document.

C#
public void ClearDocument()

Copies the selected text in the Clipboard.

C#
public void Copy()

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

C#
public SearchResult Find(string text, TextSearchOptions options)
Parameters:textstring

The text.

optionsTextSearchOptions

The options.

Returns:

SearchResult

The result.

Find(string)

SearchResult

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

C#
public SearchResult Find(string text)
Parameters:textstring

The text.

Returns:

SearchResult

The result.

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

C#
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)
Parameters:textstring

The text.

optionsTextSearchOptions

The options.

Returns:

IEnumerable<SearchResult>

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

C#
public IEnumerable<SearchResult> FindAll(string text)
Parameters:textstring

The text.

Returns:

IEnumerable<SearchResult>

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

C#
public SearchResult FindPrevious(string text, TextSearchOptions options)
Parameters:textstring

The text.

optionsTextSearchOptions

The options.

Returns:

SearchResult

Finds the previous text in the current document.

C#
public SearchResult FindPrevious(string text)
Parameters:textstring

The text.

Returns:

SearchResult

Fits FixedDocumentViewerBase content to page size.

C#
public void FitToPage()

Fits FixedDocumentViewerBase content to page width.

C#
public void FitToWidth()

Gets the registered presenter.

C#
public IFixedDocumentPresenter GetRegisteredPresenter(string presenterName)
Parameters:presenterNamestring

Name of the presenter.

Returns:

IFixedDocumentPresenter

Gets the selected text.

C#
public string GetSelectedText()
Returns:

string

Gets the selected text asynchronously.

C#
public Task<string> GetSelectedTextAsync()
Returns:

Task<string>

Goes to given destination.

C#
public void GoToDestination(Destination destination, bool syncBookmark = true)
Parameters:destinationDestination

The destination.

syncBookmarkbool

If set to true the SyncCurrentBookmarkItemCommand is executed as well.

Goes to specified page.

C#
public void GoToPage(int pageNo)
Parameters:pageNoint

The page number.

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

C#
public bool HasRegisteredPresenter(string presenterName)
Parameters:presenterNamestring

Name of the presenter.

Returns:

bool

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.

C#
public override void OnApplyTemplate()

Called when the document is changed.

C#
protected virtual void OnDocumentChangedOverride(RadFixedDocument oldValue, RadFixedDocument newValue)
Parameters:oldValueRadFixedDocument

The old value.

newValueRadFixedDocument

The new value.

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Goes a page down.

C#
public void PageDown()

Goes a page up.

C#
public void PageUp()

Prints the current document using the default print settings.

C#
public void Print()

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

C#
public void Print(PrintDialog printDialog, PrintSettings settings)
Parameters:printDialogPrintDialog

The print dialog. .

settingsPrintSettings

The print settings.

Prints the current document.

C#
public void Print(PrintSettings settings)
Parameters:settingsPrintSettings

The print settings.

Registers the presenter.

C#
public void RegisterPresenter(string presenterName, IFixedDocumentPresenter presenter)
Parameters:presenterNamestring

Name of the presenter.

presenterIFixedDocumentPresenter

The presenter.

Scrolls to horizontal offset.

C#
public void ScrollToHorizontalOffset(double offset)
Parameters:offsetdouble

The offset.

Implements: IFixedDocumentViewer.ScrollToHorizontalOffset(double)

Scrolls to vertical offset.

C#
public void ScrollToVerticalOffset(double offset)
Parameters:offsetdouble

The offset.

Implements: IFixedDocumentViewer.ScrollToVerticalOffset(double)

Creates selection from start position to end position.

C#
public void Select(TextPosition startPosition, TextPosition endPosition)
Parameters:startPositionTextPosition

The start position.

endPositionTextPosition

The end position.

Selects the specified range.

C#
public void Select(TextRange range)
Parameters:rangeTextRange

The range.

Sets the document source.

C#
protected virtual void SetDocumentSource(FixedDocumentStreamSource source)
Parameters:sourceFixedDocumentStreamSource

The source.

Sets the rotation angle.

C#
public void SetRotationAngle(RotationAngle rotationAngle)
Parameters:rotationAngleRotationAngle

The rotation angle.

Updates the current presenter layout.

C#
public void UpdatePresenterLayout()

Events

AnnotationClicked

EventHandler<AnnotationEventArgs>

Occurs when annotation is clicked.

C#
public event EventHandler<AnnotationEventArgs> AnnotationClicked

Occurs when the current page is changed.

C#
public event EventHandler<CurrentPageChangedEventArgs> CurrentPageChanged

Occurs when the PDF document is changed.

C#
public event EventHandler<DocumentChangedEventArgs> DocumentChanged

Implements: IFixedDocumentViewer.DocumentChanged

Occurs when [fixed document presenter changed].

C#
public event EventHandler FixedDocumentPresenterChanged

Occurs when the hyperlink is clicked.

C#
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked

Implements: IFixedDocumentViewer.HyperlinkClicked

Occurs when the mode is changed.

C#
public event EventHandler ModeChanged

Occurs when the scale factor is changed.

C#
public event EventHandler<ScaleFactorChangedEventArgs> ScaleFactorChanged

Implements: IFixedDocumentViewer.ScaleFactorChanged

Occurs when the scale mode is changed.

C#
public event EventHandler ScaleModeChanged