Class FixedDocumentViewerBase
Base document viewing control that can host Telerik.Windows.Documents.Fixed.Model.RadFixedDocument.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.FixedDocumentViewers.dll
Syntax
public abstract class FixedDocumentViewerBase : Control, IFixedDocumentViewer
Constructors
FixedDocumentViewerBase()
Initializes a new instance of the FixedDocumentViewerBase class.
Declaration
public FixedDocumentViewerBase()
Fields
CommandDescriptorsProperty
Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.CommandDescriptors property.
Declaration
public static readonly DependencyProperty CommandDescriptorsProperty
Field Value
System.Windows.DependencyProperty
|
CurrentPageNumberProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.CurrentPageNumber property.
Declaration
public static readonly DependencyProperty CurrentPageNumberProperty
Field Value
System.Windows.DependencyProperty
|
DocumentProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Document property.
Declaration
public static readonly DependencyProperty DocumentProperty
Field Value
System.Windows.DependencyProperty
|
ModeProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.Mode property.
Declaration
public static readonly DependencyProperty ModeProperty
Field Value
System.Windows.DependencyProperty
|
ScaleFactorProperty
Identifies Teleerik.Windows.Controls.FixedDocumentViewerBase.ScaleFactor property.
Declaration
public static readonly DependencyProperty ScaleFactorProperty
Field Value
System.Windows.DependencyProperty
|
ScaleModeProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.ScaleMode property.
Declaration
public static readonly DependencyProperty ScaleModeProperty
Field Value
System.Windows.DependencyProperty
|
SelectionFillProperty
Identifies Telerik.Windows.Controls.FixedDocumentViewerBase.SelectionFill property.
Declaration
public static readonly DependencyProperty SelectionFillProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CanHorizontallyScroll
Gets the can horizontally scroll.
Declaration
public bool CanHorizontallyScroll { get; }
Property Value
System.Boolean
The can horizontally scroll. |
Implements
CanVerticallyScroll
Gets the can vertically scroll.
Declaration
public bool CanVerticallyScroll { get; }
Property Value
System.Boolean
The can vertically scroll. |
Implements
CommandDescriptors
Gets or sets the command descriptors.
Declaration
public CommandDescriptors CommandDescriptors { get; set; }
Property Value
CommandDescriptors
The command descriptors. |
CurrentPage
Gets the current page.
Declaration
public RadFixedPage CurrentPage { get; }
Property Value
Telerik.Windows.Documents.Fixed.Model.RadFixedPage
The current page. |
CurrentPageNumber
Gets or sets the current page number.
Declaration
public int CurrentPageNumber { get; set; }
Property Value
System.Int32
The current page number. |
Cursors
Gets the cursors.
Declaration
public CursorsCollection Cursors { get; }
Property Value
CursorsCollection
The cursors. |
Implements
DefaultImportSettings
Gets or sets the default import settings for the current FixedDocumentViewerBase. This property is used in the OpenPdfDocumentCommand.
Declaration
public PdfImportSettings DefaultImportSettings { get; set; }
Property Value
Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PdfImportSettings
The default import settings. |
Document
Gets or sets the document for the viewer.
Declaration
public RadFixedDocument Document { get; set; }
Property Value
Telerik.Windows.Documents.Fixed.Model.RadFixedDocument
The document. |
Implements
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
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 Telerik.Windows.Documents.Fixed.Model.RadFixedDocument instance.
Declaration
public IFixedDocumentPresenter FixedDocumentPresenter { get; set; }
Property Value
IFixedDocumentPresenter
The document presenter. |
Implements
HorizontalScrollBar
Gets the horizontal scroll bar.
Declaration
public ScrollBar HorizontalScrollBar { get; }
Property Value
System.Windows.Controls.Primitives.ScrollBar
|
Implements
HorizontalScrollOffset
Gets the horizontal scroll offset.
Declaration
public double HorizontalScrollOffset { get; }
Property Value
System.Double
The horizontal scroll offset. |
Implements
Mode
Gets or sets the mode that the FixedDocumentViewerBase class works.
Declaration
public FixedDocumentViewerMode Mode { get; set; }
Property Value
FixedDocumentViewerMode
The mode. |
Implements
PagesCount
Gets the number of pages of the currently loaded document.
Declaration
public int PagesCount { get; }
Property Value
System.Int32
The pages count. |
RotationAngle
Gets the rotation angle.
Declaration
public RotationAngle RotationAngle { get; }
Property Value
RotationAngle
The rotation angle. |
Implements
ScaleFactor
Gets or sets the scale factor for the viewer.
Declaration
public double ScaleFactor { get; set; }
Property Value
System.Double
The scale factor. |
Implements
ScaleMode
Gets or sets the scale mode.
Declaration
public ScaleMode ScaleMode { get; set; }
Property Value
ScaleMode
The scale mode. |
SelectionFill
Gets or sets the selection fill.
Declaration
public Brush SelectionFill { get; set; }
Property Value
System.Windows.Media.Brush
The selection fill. |
Settings
Gets or sets the settings for the RadPdfViewerBase class.
Declaration
public FixedDocumentViewerSettings Settings { get; set; }
Property Value
FixedDocumentViewerSettings
The settings. |
Implements
VerticalScrollBar
Gets the vertical scroll bar.
Declaration
public ScrollBar VerticalScrollBar { get; }
Property Value
System.Windows.Controls.Primitives.ScrollBar
|
Implements
VerticalScrollOffset
Gets the vertical scroll offset.
Declaration
public double VerticalScrollOffset { get; }
Property Value
System.Double
The vertical scroll offset. |
Implements
Methods
ClearDocument()
Clears the document.
Declaration
public void ClearDocument()
Copy()
Copies the selected text in the Clipboard.
Declaration
public void Copy()
Find(String)
Finds next match for the specified text in the current document.
Declaration
public SearchResult Find(string text)
Parameters
System.String
text
The text. |
Returns
Telerik.Windows.Documents.Fixed.Search.SearchResult
The result. |
Find(String, TextSearchOptions)
Finds next match for the specified text in the current document using specified options.
Declaration
public SearchResult Find(string text, TextSearchOptions options)
Parameters
System.String
text
The text. |
Telerik.Windows.Documents.Fixed.Search.TextSearchOptions
options
The options. |
Returns
Telerik.Windows.Documents.Fixed.Search.SearchResult
The result. |
FindAll(String)
Finds all matches for the specified text in the current document.
Declaration
public IEnumerable<SearchResult> FindAll(string text)
Parameters
System.String
text
The text. |
Returns
System.Collections.Generic.IEnumerable<Telerik.Windows.Documents.Fixed.Search.SearchResult>
|
FindAll(String, TextSearchOptions)
Finds all matches for the specified text in the current document using specified options.
Declaration
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)
Parameters
System.String
text
The text. |
Telerik.Windows.Documents.Fixed.Search.TextSearchOptions
options
The options. |
Returns
System.Collections.Generic.IEnumerable<Telerik.Windows.Documents.Fixed.Search.SearchResult>
|
FindPrevious(String)
Finds the previous text in the current document.
Declaration
public SearchResult FindPrevious(string text)
Parameters
System.String
text
The text. |
Returns
Telerik.Windows.Documents.Fixed.Search.SearchResult
|
FindPrevious(String, TextSearchOptions)
Finds the previous text in the current document using specified options.
Declaration
public SearchResult FindPrevious(string text, TextSearchOptions options)
Parameters
System.String
text
The text. |
Telerik.Windows.Documents.Fixed.Search.TextSearchOptions
options
The options. |
Returns
Telerik.Windows.Documents.Fixed.Search.SearchResult
|
FitToPage()
Fits FixedDocumentViewerBase content to page size.
Declaration
public void FitToPage()
FitToWidth()
Fits FixedDocumentViewerBase content to page width.
Declaration
public void FitToWidth()
GetRegisteredPresenter(String)
Gets the registered presenter.
Declaration
public IFixedDocumentPresenter GetRegisteredPresenter(string presenterName)
Parameters
System.String
presenterName
Name of the presenter. |
Returns
IFixedDocumentPresenter
|
GetSelectedText()
Gets the selected text.
Declaration
public string GetSelectedText()
Returns
System.String
|
GetSelectedTextAsync()
Gets the selected text asynchronously.
Declaration
public Task<string> GetSelectedTextAsync()
Returns
System.Threading.Tasks.Task<System.String>
|
GetSelectedTextAsync(Action<String>)
Gets the selected text asynchronously. The callback is called on the Dispatcher.
Declaration
[Obsolete("Use GetSelectedTextAsync() method instead.")]
public void GetSelectedTextAsync(Action<string> callback)
Parameters
System.Action<System.String>
callback
The callback that will be called when the text extraction completes. |
GoToDestination(Destination)
GoToPage(Int32)
Goes to specified page.
Declaration
public void GoToPage(int pageNo)
Parameters
System.Int32
pageNo
The page number. |
HasRegisteredPresenter(String)
Determines whether [has registered presenter] [the specified presenter name].
Declaration
public bool HasRegisteredPresenter(string presenterName)
Parameters
System.String
presenterName
Name of the presenter. |
Returns
System.Boolean
|
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
Declaration
public override void OnApplyTemplate()
OnDocumentChangedOverride(RadFixedDocument, RadFixedDocument)
Called when the document is changed.
Declaration
protected virtual void OnDocumentChangedOverride(RadFixedDocument oldValue, RadFixedDocument newValue)
Parameters
Telerik.Windows.Documents.Fixed.Model.RadFixedDocument
oldValue
The old value. |
Telerik.Windows.Documents.Fixed.Model.RadFixedDocument
newValue
The new value. |
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
PageDown()
Goes a page down.
Declaration
public void PageDown()
PageUp()
Goes a page up.
Declaration
public void PageUp()
Print()
Prints the current document using the default print settings.
Declaration
public void Print()
Print(PrintDialog, PrintSettings)
Prints with the specified print dialog. The dialog should already be initialized.
Declaration
public void Print(PrintDialog printDialog, PrintSettings settings)
Parameters
System.Windows.Controls.PrintDialog
printDialog
The print dialog. . |
PrintSettings
settings
The print settings. |
Print(PrintSettings)
Prints the current document.
Declaration
public void Print(PrintSettings settings)
Parameters
PrintSettings
settings
The print settings. |
RegisterPresenter(String, IFixedDocumentPresenter)
Registers the presenter.
Declaration
public void RegisterPresenter(string presenterName, IFixedDocumentPresenter presenter)
Parameters
System.String
presenterName
Name of the presenter. |
IFixedDocumentPresenter
presenter
The presenter. |
ScrollToHorizontalOffset(Double)
Scrolls to horizontal offset.
Declaration
public void ScrollToHorizontalOffset(double offset)
Parameters
System.Double
offset
The offset. |
Implements
ScrollToVerticalOffset(Double)
Scrolls to vertical offset.
Declaration
public void ScrollToVerticalOffset(double offset)
Parameters
System.Double
offset
The offset. |
Implements
Select(TextPosition, TextPosition)
Creates selection from start position to end position.
Declaration
public void Select(TextPosition startPosition, TextPosition endPosition)
Parameters
Telerik.Windows.Documents.Fixed.Text.TextPosition
startPosition
The start position. |
Telerik.Windows.Documents.Fixed.Text.TextPosition
endPosition
The end position. |
Select(TextRange)
Selects the specified range.
Declaration
public void Select(TextRange range)
Parameters
Telerik.Windows.Documents.Fixed.Text.TextRange
range
The range. |
SetDocumentSource(FixedDocumentStreamSource)
Sets the document source.
Declaration
protected virtual void SetDocumentSource(FixedDocumentStreamSource source)
Parameters
FixedDocumentStreamSource
source
The source. |
SetRotationAngle(RotationAngle)
Sets the rotation angle.
Declaration
public void SetRotationAngle(RotationAngle rotationAngle)
Parameters
RotationAngle
rotationAngle
The rotation angle. |
UpdatePresenterLayout()
Updates the current presenter layout.
Declaration
public void UpdatePresenterLayout()
Events
AnnotationClicked
Occurs when annotation is clicked.
Declaration
public event EventHandler<AnnotationEventArgs> AnnotationClicked
Event Type
System.EventHandler<Telerik.Windows.Documents.Fixed.Model.Annotations.EventArgs.AnnotationEventArgs>
|
CurrentPageChanged
Occurs when the current page is changed.
Declaration
public event EventHandler<CurrentPageChangedEventArgs> CurrentPageChanged
Event Type
System.EventHandler<CurrentPageChangedEventArgs>
|
DocumentChanged
Occurs when the PDF document is changed.
Declaration
public event EventHandler<DocumentChangedEventArgs> DocumentChanged
Event Type
System.EventHandler<DocumentChangedEventArgs>
|
Implements
FixedDocumentPresenterChanged
Occurs when [fixed document presenter changed].
Declaration
public event EventHandler FixedDocumentPresenterChanged
Event Type
System.EventHandler
|
ModeChanged
Occurs when the mode is changed.
Declaration
public event EventHandler ModeChanged
Event Type
System.EventHandler
|
ScaleFactorChanged
Occurs when the scale factor is changed.
Declaration
public event EventHandler<ScaleFactorChangedEventArgs> ScaleFactorChanged
Event Type
System.EventHandler<ScaleFactorChangedEventArgs>
|
Implements
ScaleModeChanged
Occurs when the scale mode is changed.
Declaration
public event EventHandler ScaleModeChanged
Event Type
System.EventHandler
|