Base document viewing control that can host RadFixedDocument.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.FixedDocumentViewers.dll
Syntax:
public abstract class FixedDocumentViewerBase : Control, IFixedDocumentViewer
Inheritance: objectFixedDocumentViewerBase
Derived Classes:
Implements:
Constructors
Initializes a new instance of the FixedDocumentViewerBase class.
public FixedDocumentViewerBase()
Fields
CommandDescriptorsProperty
DependencyProperty
Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.CommandDescriptors property.
public static readonly DependencyProperty CommandDescriptorsProperty
CurrentPageNumberProperty
DependencyProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.CurrentPageNumber property.
public static readonly DependencyProperty CurrentPageNumberProperty
DocumentProperty
DependencyProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Document property.
public static readonly DependencyProperty DocumentProperty
ModeProperty
DependencyProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Mode property.
public static readonly DependencyProperty ModeProperty
ScaleFactorProperty
DependencyProperty
Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.ScaleFactor property.
public static readonly DependencyProperty ScaleFactorProperty
ScaleModeProperty
DependencyProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.ScaleMode property.
public static readonly DependencyProperty ScaleModeProperty
SelectionFillProperty
DependencyProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.SelectionFill property.
public static readonly DependencyProperty SelectionFillProperty
Properties
Gets the can horizontally scroll.
public bool CanHorizontallyScroll { get; }
The can horizontally scroll.
Implements:
Gets the can vertically scroll.
public bool CanVerticallyScroll { get; }
The can vertically scroll.
Implements:
Gets or sets the command descriptors.
public CommandDescriptors CommandDescriptors { get; set; }
The command descriptors.
CurrentPage
RadFixedPage
Gets the current page.
public RadFixedPage CurrentPage { get; }
The current page.
Gets or sets the current page number.
public int CurrentPageNumber { get; set; }
The current page number.
Gets the cursors.
public CursorsCollection Cursors { get; }
The cursors.
Implements:
DefaultImportSettings
PdfImportSettings
Gets or sets the default import settings for the current FixedDocumentViewerBase. This property is used in the OpenPdfDocumentCommand.
public PdfImportSettings DefaultImportSettings { get; set; }
The default import settings.
Document
RadFixedDocument
Gets or sets the document for the viewer.
public RadFixedDocument Document { get; set; }
The document.
Implements:
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.
public abstract FixedDocumentStreamSource DocumentSource { get; set; }
The document source.
Gets or sets the document presenter. The fixed document presenter is used to visualize RadFixedDocument instance.
public IFixedDocumentPresenter FixedDocumentPresenter { get; set; }
The document presenter.
Implements:
HorizontalScrollBar
ScrollBar
Gets the horizontal scroll bar.
public ScrollBar HorizontalScrollBar { get; }
Implements:
Gets the horizontal scroll offset.
public double HorizontalScrollOffset { get; }
The horizontal scroll offset.
Implements:
Gets or sets the mode that the FixedDocumentViewerBase class works.
public FixedDocumentViewerMode Mode { get; set; }
The mode.
Implements:
Gets the number of pages of the currently loaded document.
public int PagesCount { get; }
The pages count.
Gets the rotation angle.
public RotationAngle RotationAngle { get; }
The rotation angle.
Implements:
Gets or sets the scale factor for the viewer.
public double ScaleFactor { get; set; }
The scale factor.
Implements:
ScaleMode
ScaleMode
Gets or sets the scale mode.
public ScaleMode ScaleMode { get; set; }
The scale mode.
SelectionFill
Brush
Gets or sets the selection fill.
public Brush SelectionFill { get; set; }
The selection fill.
Gets or sets the settings for the RadPdfViewerBase class.
public FixedDocumentViewerSettings Settings { get; set; }
The settings.
Implements:
VerticalScrollBar
ScrollBar
Gets the vertical scroll bar.
public ScrollBar VerticalScrollBar { get; }
Implements:
Gets the vertical scroll offset.
public double VerticalScrollOffset { get; }
The vertical scroll offset.
Implements:
Methods
Clears the document.
public void ClearDocument()
Copies the selected text in the Clipboard.
public void Copy()
Find(string, TextSearchOptions)
SearchResult
Finds next match for the specified text in the current document using specified options.
public SearchResult Find(string text, TextSearchOptions options)
The text.
optionsTextSearchOptionsThe options.
Returns:SearchResult
The result.
Find(string)
SearchResult
Finds next match for the specified text in the current document.
public SearchResult Find(string text)
The text.
Returns:SearchResult
The result.
FindAll(string, TextSearchOptions)
IEnumerable<SearchResult>
Finds all matches for the specified text in the current document using specified options.
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)
The text.
optionsTextSearchOptionsThe options.
Returns:IEnumerable<SearchResult>
FindAll(string)
IEnumerable<SearchResult>
Finds all matches for the specified text in the current document.
public IEnumerable<SearchResult> FindAll(string text)
The text.
Returns:IEnumerable<SearchResult>
FindPrevious(string, TextSearchOptions)
SearchResult
Finds the previous text in the current document using specified options.
public SearchResult FindPrevious(string text, TextSearchOptions options)
The text.
optionsTextSearchOptionsThe options.
Returns:SearchResult
FindPrevious(string)
SearchResult
Finds the previous text in the current document.
public SearchResult FindPrevious(string text)
The text.
Returns:SearchResult
Fits FixedDocumentViewerBase content to page size.
public void FitToPage()
Fits FixedDocumentViewerBase content to page width.
public void FitToWidth()
Gets the registered presenter.
public IFixedDocumentPresenter GetRegisteredPresenter(string presenterName)
Name of the presenter.
Returns:Gets the selected text.
Goes to given destination.
public void GoToDestination(Destination destination, bool syncBookmark = true)
The destination.
syncBookmarkboolIf set to true the SyncCurrentBookmarkItemCommand is executed as well.
Goes to specified page.
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.
public override void OnApplyTemplate()
Called when the document is changed.
protected virtual void OnDocumentChangedOverride(RadFixedDocument oldValue, RadFixedDocument newValue)
The old value.
newValueRadFixedDocumentThe new value.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Goes a page down.
public void PageDown()
Goes a page up.
public void PageUp()
Prints the current document using the default print settings.
public void Print()
Prints with the specified print dialog. The dialog should already be initialized.
public void Print(PrintDialog printDialog, PrintSettings settings)
The print dialog. .
settingsPrintSettingsThe print settings.
Prints the current document.
Registers the presenter.
public void RegisterPresenter(string presenterName, IFixedDocumentPresenter presenter)
Name of the presenter.
presenterIFixedDocumentPresenterThe presenter.
Scrolls to horizontal offset.
public void ScrollToHorizontalOffset(double offset)
The offset.
Implements:
Scrolls to vertical offset.
Creates selection from start position to end position.
public void Select(TextPosition startPosition, TextPosition endPosition)
The start position.
endPositionTextPositionThe end position.
Selects the specified range.
public void Select(TextRange range)
The range.
Sets the document source.
protected virtual void SetDocumentSource(FixedDocumentStreamSource source)
The source.
Sets the rotation angle.
public void SetRotationAngle(RotationAngle rotationAngle)
The rotation angle.
Updates the current presenter layout.
public void UpdatePresenterLayout()
Events
AnnotationClicked
EventHandler<AnnotationEventArgs>
Occurs when annotation is clicked.
public event EventHandler<AnnotationEventArgs> AnnotationClicked
Occurs when the current page is changed.
public event EventHandler<CurrentPageChangedEventArgs> CurrentPageChanged
Occurs when the PDF document is changed.
public event EventHandler<DocumentChangedEventArgs> DocumentChanged
Implements:
Occurs when [fixed document presenter changed].
public event EventHandler FixedDocumentPresenterChanged
Occurs when the hyperlink is clicked.
public event EventHandler<HyperlinkClickedEventArgs> HyperlinkClicked
Implements:
Occurs when the mode is changed.
public event EventHandler ModeChanged
Occurs when the scale factor is changed.
public event EventHandler<ScaleFactorChangedEventArgs> ScaleFactorChanged
Implements:
Occurs when the scale mode is changed.
public event EventHandler ScaleModeChanged