Skip to main content

PdfViewer Class

Definition​

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

Keyboard nudging of the selected annotation and deselection from presses outside the pages.

public class PdfViewer

Inheritance: object -> AvaloniaObject -> Animatable -> StyledElement -> Visual -> Layoutable -> Interactive -> InputElement -> Control -> TemplatedControl -> PdfViewer

Constructors​

NameDescription
PdfViewerNo summary available.

PdfViewer Constructor​

public PdfViewer()

Methods​

NameDescription
AddBookmarkAdds a bookmark for the given 1-based page. No-op when the page is out of range or already bookmarked. Returns if a bookmark was added.
AddHandler (2 overloads)Adds a handler for the specified routed event. Inherited from Interactive.
AddStampAsyncNo summary available.
AddStickyNoteAsyncNo summary available.
ApplyStylingApplies styling to the control if the control is initialized and styling is not already applied. Inherited from StyledElement.
ApplyTemplateCreates the visual children of the control, if necessary Inherited from TemplatedControl.
ArrangeArranges the control and its children. Inherited from Layoutable.
BeginInitInherited from StyledElement.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearErrorClears Avalonia.Controls.PdfViewer.ErrorMessage. An open document stays open; after a failed load the viewer returns to its empty state. The template's dismiss buttons call this.
ClearSearchClears the current search query, results, and highlights.
ClearSelectionClears the current text selection.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CloseDocumentCloses the current document.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
CopySelectionToClipboardCopies the current selection to the clipboard.
DefaultStampColorForThe colour a stamp is drawn in when Avalonia.Controls.PdfViewer.StampColor is not set.
EndInitInherited from StyledElement.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
FindNextAdvances to the next search match (wraps around).
FindPreviousMoves to the previous search match (wraps around).
FitHeightFits the current page height to the view.
FitPageFits the entire page to the view.
FitWidthFits the page width to the view.
FocusFocuses the control. Inherited from InputElement.
FocusViewerFocuses the PDF viewer control for keyboard navigation. Call this after external interactions (like opening a file) to enable keyboard navigation.
FormatStampDateFormats date the way a stamp's date line is drawn.
GetAnnotationsAsyncGets the annotations on a page (0-based index). Returns an empty list when no document is loaded or the index is out of range.
GetBaseValueInherited from AvaloniaObject.
GetFlowDirectionGets the value of the attached Avalonia.Visual.FlowDirectionProperty on a control. Inherited from Visual.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetIsHoldingEnabledInherited from InputElement.
GetIsHoldWithMouseEnabledInherited from InputElement.
GetIsTemplateFocusTargetGets the value of the IsTemplateFocusTargetProperty attached property on a control. Inherited from TemplatedControl.
GetOutlineGets the document outline (bookmarks).
GetPageLabelThe page's label from the document's /PageLabels ("iv", "A-2"), or null when the document defines none. pageNumber is 1-based.
GetPageTextAsyncExtracts the plain text of a single page (0-based index). Returns an empty string when no document is loaded or the index is out of range.
GetSelectedTextGets the currently selected text.
GetTextAsyncExtracts the plain text of the whole document, one page per element.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
GoToBookmarkNavigates to a bookmark's target: its full destination (page plus position) when it has one, else its page. Returns true if the bookmark has a page target.
GoToPageNavigates to a specific page.
HighlightSelectionAsyncNo summary available.
InvalidateArrangeInvalidates the arrangement of the control and queues a new layout pass. Inherited from Layoutable.
InvalidateMeasureInvalidates the measurement of the control and queues a new layout pass. Inherited from Layoutable.
InvalidateVisualInvalidates the visual and queues a repaint. Inherited from Visual.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsPageBookmarkedReturns whether the given 1-based page currently has a bookmark.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
LoadDocumentAsync (3 overloads)Loads a PDF document from a stream. The stream is read once, from its current position (a seekable stream left at its end is read from the start), and is never disposed or kept: the viewer holds its own copy of the bytes, so the caller may dispose the stream as soon as this call returns. The document has no path; save with Avalonia.Controls.PdfViewer.SaveDocumentAsync(string) or Save As.
MeasureCarries out a measure of the control. Inherited from Layoutable.
NavigateToNavigates to a link destination: the page, and in the continuous view modes the position on it (an /XYZ or /FitH target lands with its top edge at the top of the viewport, not the page top); an /XYZ zoom that is set is applied first. Returns true if it was an in-document page destination that could be resolved.
NextPageNavigates to the next page (or next spread in two-page mode).
OpenOpens a document via the file picker (fire-and-forget). See Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken).
OpenAsyncAsks the user for a PDF and loads it. Raises Avalonia.Controls.PdfViewer.OpenRequested first; when the host does not handle it, the platform file picker of the owning Avalonia.Controls.TopLevel is used. A file with a local path is opened by path (so Avalonia.Controls.PdfViewer.Source is set and in-place saving works); otherwise it is read through a stream.
OpenMoreOptionsOpens the More Options flyout programmatically.
PreviousPageNavigates to the previous page (or previous spread in two-page mode).
PrintPrints the current document (fire-and-forget). Errors surface via Avalonia.Controls.PdfViewer.ErrorMessage.
PrintAsyncPrints the current document. Raises Avalonia.Controls.PdfViewer.PrintRequested first; if the handler marks it handled nothing else happens, otherwise the Avalonia.Controls.PdfViewer.PrintService shows the system print dialog. No-op when no document is loaded.
RaiseEventRaises a routed event. Inherited from Interactive.
RedactSelectionAsyncNo summary available.
RedoRe-applies the most recently undone edit, if any.
RedoAsyncRe-applies the most recently undone edit and completes when the document has been updated.
RemoveBookmarkRemoves the bookmark for the given 1-based page. Returns if a bookmark was removed.
RemoveHandler (2 overloads)Removes a handler for the specified routed event. Inherited from Interactive.
RenderRenders the visual to a Avalonia.Media.DrawingContext. Inherited from Visual.
RenderPageToImageAsyncRenders a page (0-based index) to a bitmap at the given scale (1.0 == 100%). Returns null when no document is loaded or the index is out of range. The caller owns the returned bitmap and should dispose it.
ResetZoomResets zoom to 100%.
SaveSaves the document in place (fire-and-forget); a failure, including a stream-backed document with no path, is reported through Avalonia.Controls.PdfViewer.ErrorMessage. See Avalonia.Controls.PdfViewer.SaveAsync.
SaveAsSaves via the save picker (fire-and-forget). See Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken).
SaveAsAsyncWrites the document, with its annotation edits, to a file chosen by the user. Raises Avalonia.Controls.PdfViewer.SaveAsRequested first; when the host does not handle it, the platform save picker of the owning Avalonia.Controls.TopLevel is used. Choosing the open file saves in place (see Avalonia.Controls.PdfViewer.SaveAsync); choosing another local path writes it and the viewer switches to that file, keeping the current page.
SaveAsyncSaves the document in place to its original Avalonia.Controls.PdfViewer.Source path, including any annotation edits. No-op when Avalonia.Controls.PdfViewer.AllowDocumentSaving is false or when no document is loaded. A document loaded from a stream or byte array has no path to save to: use Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) or Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken) for those.
SaveDocumentAsync (2 overloads)Saves the document (with all annotations) to a stream.
SearchAsync (2 overloads)Searches for text in the document and publishes the results (Avalonia.Controls.PdfViewer.SearchResults, find next/previous, Avalonia.Controls.PdfViewer.SearchCompleted). A failure is reported through Avalonia.Controls.PdfViewer.ErrorMessage and returns an empty list.
SelectAllSelects all text on the current page.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetFlowDirectionSets the value of the attached Avalonia.Visual.FlowDirectionProperty on a control. Inherited from Visual.
SetIsHoldingEnabledInherited from InputElement.
SetIsHoldWithMouseEnabledInherited from InputElement.
SetIsTemplateFocusTargetSets the value of the IsTemplateFocusTargetProperty attached property on a control. Inherited from TemplatedControl.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
ShareShares the current document (fire-and-forget). Errors surface via Avalonia.Controls.PdfViewer.ErrorMessage.
ShareAsyncShares the current document. Raises Avalonia.Controls.PdfViewer.ShareRequested first; if the handler marks it handled nothing else happens, otherwise the Avalonia.Controls.PdfViewer.ShareService shows the system share sheet. No-op when no document is loaded.
SquigglySelectionAsyncNo summary available.
StampNameForLabelStamp name for a label: the label without spaces, so standard labels map to standard names.
StampStyleDisplayNameThe English name of a style as shown in the Stamp dropdown (see Avalonia.Controls.PdfViewer.Strings for other languages).
StrikeoutSelectionAsyncNo summary available.
ToggleBookmarkToggles the bookmark for the given 1-based page. Returns the new state ( when the page is now bookmarked).
ToggleBookmarkCurrentPageToggles the bookmark for the current page (the ⌘D / Ctrl+D action).
TryGetResourceInherited from StyledElement.
UnderlineSelectionAsyncNo summary available.
UndoReverts the most recent edit, if any.
UndoAsyncReverts the most recent edit and completes when the document has been updated.
UpdateLayoutExecutes a layout pass. Inherited from Layoutable.
UpdateStickyNoteAsyncNo summary available.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.
ZoomInZooms in to the next preset level.
ZoomOutZooms out to the previous preset level.

AddBookmark Method​

Adds a bookmark for the given 1-based page. No-op when the page is out of range or already bookmarked. Returns if a bookmark was added.

public bool AddBookmark(int pageNumber)

Parameters​

pageNumber int

Returns​

bool

AddStampAsync Method​

public System.Threading.Tasks.Task<int> AddStampAsync(int pageIndex, string label, double pdfX, double pdfY, Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color, Nullable<Avalonia.Controls.PdfStampStyle> style, Nullable<bool> includeDate)

Parameters​

pageIndex int

label string

pdfX double

pdfY double

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

style Nullable<Avalonia.Controls.PdfStampStyle>

includeDate Nullable<bool>

Returns​

System.Threading.Tasks.Task<int>

AddStickyNoteAsync Method​

public System.Threading.Tasks.Task<int> AddStickyNoteAsync(int pageIndex, double pdfX, double pdfY, string text, Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

pageIndex int

pdfX double

pdfY double

text string

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

ClearError Method​

Clears Avalonia.Controls.PdfViewer.ErrorMessage. An open document stays open; after a failed load the viewer returns to its empty state. The template's dismiss buttons call this.

public void ClearError()

ClearSearch Method​

Clears the current search query, results, and highlights.

public void ClearSearch()

ClearSelection Method​

Clears the current text selection.

public void ClearSelection()

CloseDocument Method​

Closes the current document.

public void CloseDocument()

CopySelectionToClipboard Method​

Copies the current selection to the clipboard.

public System.Threading.Tasks.Task CopySelectionToClipboard()

Returns​

System.Threading.Tasks.Task

DefaultStampColorFor Method​

The colour a stamp is drawn in when Avalonia.Controls.PdfViewer.StampColor is not set.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor DefaultStampColorFor(string label)

Parameters​

label string

Returns​

Avalonia.Controls.Pdf.Core.PdfAnnotationColor

FindNext Method​

Advances to the next search match (wraps around).

public void FindNext()

FindPrevious Method​

Moves to the previous search match (wraps around).

public void FindPrevious()

FitHeight Method​

Fits the current page height to the view.

public void FitHeight()

FitPage Method​

Fits the entire page to the view.

public void FitPage()

FitWidth Method​

Fits the page width to the view.

public void FitWidth()

FocusViewer Method​

Focuses the PDF viewer control for keyboard navigation. Call this after external interactions (like opening a file) to enable keyboard navigation.

public void FocusViewer()

FormatStampDate Method​

Formats date the way a stamp's date line is drawn.

public string FormatStampDate(DateTime date)

Parameters​

date DateTime

Returns​

string

GetAnnotationsAsync Method​

Gets the annotations on a page (0-based index). Returns an empty list when no document is loaded or the index is out of range.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfAnnotationInfo>> GetAnnotationsAsync(int pageIndex, System.Threading.CancellationToken cancellationToken)

Parameters​

pageIndex int

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfAnnotationInfo>>

GetOutline Method​

Gets the document outline (bookmarks).

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfBookmark> GetOutline()

Returns​

System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfBookmark>

GetPageLabel Method​

The page's label from the document's /PageLabels ("iv", "A-2"), or null when the document defines none. pageNumber is 1-based.

public string GetPageLabel(int pageNumber)

Parameters​

pageNumber int

Returns​

string

GetPageTextAsync Method​

Extracts the plain text of a single page (0-based index). Returns an empty string when no document is loaded or the index is out of range.

public System.Threading.Tasks.Task<string> GetPageTextAsync(int pageIndex, System.Threading.CancellationToken cancellationToken)

Parameters​

pageIndex int

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task<string>

GetSelectedText Method​

Gets the currently selected text.

public string GetSelectedText()

Returns​

string

The selected text, or null if no selection.

GetTextAsync Method​

Extracts the plain text of the whole document, one page per element.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>> GetTextAsync(System.Threading.CancellationToken cancellationToken)

Parameters​

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>>

GoToBookmark Method​

Navigates to a bookmark's target: its full destination (page plus position) when it has one, else its page. Returns true if the bookmark has a page target.

public bool GoToBookmark(Avalonia.Controls.Pdf.Core.PdfBookmark bookmark)

Parameters​

bookmark Avalonia.Controls.Pdf.Core.PdfBookmark

Returns​

bool

GoToPage Method​

Navigates to a specific page.

public void GoToPage(int pageNumber)

Parameters​

pageNumber int

HighlightSelectionAsync Method​

public System.Threading.Tasks.Task<int> HighlightSelectionAsync(Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

IsPageBookmarked Method​

Returns whether the given 1-based page currently has a bookmark.

public bool IsPageBookmarked(int pageNumber)

Parameters​

pageNumber int

Returns​

bool

LoadDocumentAsync overloads​

LoadDocumentAsync Method​

Loads a PDF document from a stream. The stream is read once, from its current position (a seekable stream left at its end is read from the start), and is never disposed or kept: the viewer holds its own copy of the bytes, so the caller may dispose the stream as soon as this call returns. The document has no path; save with Avalonia.Controls.PdfViewer.SaveDocumentAsync(string) or Save As.

public System.Threading.Tasks.Task LoadDocumentAsync(System.IO.Stream stream, string password)
Parameters​

stream System.IO.Stream

password string

Returns​

System.Threading.Tasks.Task

LoadDocumentAsync Method​

public System.Threading.Tasks.Task LoadDocumentAsync(ReadOnlyMemory<byte> data, string password)
Parameters​

data ReadOnlyMemory<byte>

password string

Returns​

System.Threading.Tasks.Task

LoadDocumentAsync Method​

Loads a PDF document from a file path.

public System.Threading.Tasks.Task LoadDocumentAsync(string path, string password)
Parameters​

path string

password string

Returns​

System.Threading.Tasks.Task

Navigates to a link destination: the page, and in the continuous view modes the position on it (an /XYZ or /FitH target lands with its top edge at the top of the viewport, not the page top); an /XYZ zoom that is set is applied first. Returns true if it was an in-document page destination that could be resolved.

public bool NavigateTo(Avalonia.Controls.Pdf.Core.PdfLinkDestination destination)

Parameters​

destination Avalonia.Controls.Pdf.Core.PdfLinkDestination

Returns​

bool

NextPage Method​

Navigates to the next page (or next spread in two-page mode).

public void NextPage()

Open Method​

Opens a document via the file picker (fire-and-forget). See Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken).

public void Open()

OpenAsync Method​

Asks the user for a PDF and loads it. Raises Avalonia.Controls.PdfViewer.OpenRequested first; when the host does not handle it, the platform file picker of the owning Avalonia.Controls.TopLevel is used. A file with a local path is opened by path (so Avalonia.Controls.PdfViewer.Source is set and in-place saving works); otherwise it is read through a stream.

public System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken)

Parameters​

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task

Exceptions​

OpenMoreOptions Method​

Opens the More Options flyout programmatically.

public void OpenMoreOptions()

PreviousPage Method​

Navigates to the previous page (or previous spread in two-page mode).

public void PreviousPage()

Prints the current document (fire-and-forget). Errors surface via Avalonia.Controls.PdfViewer.ErrorMessage.

public void Print()

PrintAsync Method​

Prints the current document. Raises Avalonia.Controls.PdfViewer.PrintRequested first; if the handler marks it handled nothing else happens, otherwise the Avalonia.Controls.PdfViewer.PrintService shows the system print dialog. No-op when no document is loaded.

public System.Threading.Tasks.Task PrintAsync(Avalonia.Controls.Pdf.Services.PrintOptions options, System.Threading.CancellationToken cancellationToken)

Parameters​

options Avalonia.Controls.Pdf.Services.PrintOptions

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task

Exceptions​

RedactSelectionAsync Method​

public System.Threading.Tasks.Task<int> RedactSelectionAsync(Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

Redo Method​

Re-applies the most recently undone edit, if any.

public void Redo()

RedoAsync Method​

Re-applies the most recently undone edit and completes when the document has been updated.

public System.Threading.Tasks.Task RedoAsync()

Returns​

System.Threading.Tasks.Task

RemoveBookmark Method​

Removes the bookmark for the given 1-based page. Returns if a bookmark was removed.

public bool RemoveBookmark(int pageNumber)

Parameters​

pageNumber int

Returns​

bool

RenderPageToImageAsync Method​

Renders a page (0-based index) to a bitmap at the given scale (1.0 == 100%). Returns null when no document is loaded or the index is out of range. The caller owns the returned bitmap and should dispose it.

public System.Threading.Tasks.Task<Avalonia.Media.Imaging.Bitmap> RenderPageToImageAsync(int pageIndex, double scale, System.Threading.CancellationToken cancellationToken)

Parameters​

pageIndex int

scale double

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task<Avalonia.Media.Imaging.Bitmap>

ResetZoom Method​

Resets zoom to 100%.

public void ResetZoom()

Save Method​

Saves the document in place (fire-and-forget); a failure, including a stream-backed document with no path, is reported through Avalonia.Controls.PdfViewer.ErrorMessage. See Avalonia.Controls.PdfViewer.SaveAsync.

public void Save()

SaveAs Method​

Saves via the save picker (fire-and-forget). See Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken).

public void SaveAs()

SaveAsAsync Method​

Writes the document, with its annotation edits, to a file chosen by the user. Raises Avalonia.Controls.PdfViewer.SaveAsRequested first; when the host does not handle it, the platform save picker of the owning Avalonia.Controls.TopLevel is used. Choosing the open file saves in place (see Avalonia.Controls.PdfViewer.SaveAsync); choosing another local path writes it and the viewer switches to that file, keeping the current page.

public System.Threading.Tasks.Task SaveAsAsync(System.Threading.CancellationToken cancellationToken)

Parameters​

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task

Exceptions​

SaveAsync Method​

Saves the document in place to its original Avalonia.Controls.PdfViewer.Source path, including any annotation edits. No-op when Avalonia.Controls.PdfViewer.AllowDocumentSaving is false or when no document is loaded. A document loaded from a stream or byte array has no path to save to: use Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) or Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken) for those.

public System.Threading.Tasks.Task SaveAsync()

Returns​

System.Threading.Tasks.Task

Exceptions​

SaveDocumentAsync overloads​

SaveDocumentAsync Method​

Saves the document (with all annotations) to a stream.

public System.Threading.Tasks.Task SaveDocumentAsync(System.IO.Stream stream)
Parameters​

stream System.IO.Stream

Returns​

System.Threading.Tasks.Task

SaveDocumentAsync Method​

Saves the document (with all annotations) to a file path.

public System.Threading.Tasks.Task SaveDocumentAsync(string filePath)
Parameters​

filePath string

Returns​

System.Threading.Tasks.Task

SearchAsync overloads​

SearchAsync Method​

Searches for text in the document and publishes the results (Avalonia.Controls.PdfViewer.SearchResults, find next/previous, Avalonia.Controls.PdfViewer.SearchCompleted). A failure is reported through Avalonia.Controls.PdfViewer.ErrorMessage and returns an empty list.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>> SearchAsync(string query, Avalonia.Controls.Pdf.Core.SearchOptions options)
Parameters​

query string

options Avalonia.Controls.Pdf.Core.SearchOptions

Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>>

SearchAsync Method​

Searches for text in the document and publishes the results. The document is scanned a page at a time, so cancellationToken stops the search within a page.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>> SearchAsync(string query, Avalonia.Controls.Pdf.Core.SearchOptions options, System.Threading.CancellationToken cancellationToken)
Parameters​

query string

options Avalonia.Controls.Pdf.Core.SearchOptions

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>>

Exceptions​

SelectAll Method​

Selects all text on the current page.

public void SelectAll()

Share Method​

Shares the current document (fire-and-forget). Errors surface via Avalonia.Controls.PdfViewer.ErrorMessage.

public void Share()

ShareAsync Method​

Shares the current document. Raises Avalonia.Controls.PdfViewer.ShareRequested first; if the handler marks it handled nothing else happens, otherwise the Avalonia.Controls.PdfViewer.ShareService shows the system share sheet. No-op when no document is loaded.

public System.Threading.Tasks.Task ShareAsync(Avalonia.Controls.Pdf.Services.ShareOptions options, System.Threading.CancellationToken cancellationToken)

Parameters​

options Avalonia.Controls.Pdf.Services.ShareOptions

cancellationToken System.Threading.CancellationToken

Returns​

System.Threading.Tasks.Task

Exceptions​

SquigglySelectionAsync Method​

public System.Threading.Tasks.Task<int> SquigglySelectionAsync(Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

StampNameForLabel Method​

Stamp name for a label: the label without spaces, so standard labels map to standard names.

public string StampNameForLabel(string label)

Parameters​

label string

Returns​

string

StampStyleDisplayName Method​

The English name of a style as shown in the Stamp dropdown (see Avalonia.Controls.PdfViewer.Strings for other languages).

public string StampStyleDisplayName(Avalonia.Controls.PdfStampStyle style)

Parameters​

style Avalonia.Controls.PdfStampStyle

Returns​

string

StrikeoutSelectionAsync Method​

public System.Threading.Tasks.Task<int> StrikeoutSelectionAsync(Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

ToggleBookmark Method​

Toggles the bookmark for the given 1-based page. Returns the new state ( when the page is now bookmarked).

public bool ToggleBookmark(int pageNumber)

Parameters​

pageNumber int

Returns​

bool

ToggleBookmarkCurrentPage Method​

Toggles the bookmark for the current page (the ⌘D / Ctrl+D action).

public void ToggleBookmarkCurrentPage()

UnderlineSelectionAsync Method​

public System.Threading.Tasks.Task<int> UnderlineSelectionAsync(Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task<int>

Undo Method​

Reverts the most recent edit, if any.

public void Undo()

UndoAsync Method​

Reverts the most recent edit and completes when the document has been updated.

public System.Threading.Tasks.Task UndoAsync()

Returns​

System.Threading.Tasks.Task

UpdateStickyNoteAsync Method​

public System.Threading.Tasks.Task UpdateStickyNoteAsync(int pageIndex, int annotIndex, string text, Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> color)

Parameters​

pageIndex int

annotIndex int

text string

color Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>

Returns​

System.Threading.Tasks.Task

ZoomIn Method​

Zooms in to the next preset level.

public void ZoomIn()

ZoomOut Method​

Zooms out to the previous preset level.

public void ZoomOut()

Properties​

NameDescription
ActiveToolGets or sets the tool applied to the next pointer gesture on a page. The built-in toolbar and a host's own controls both read and write this one value: setting it arms the tool (and, for Avalonia.Controls.PdfViewerTool.Shape, keeps or defaults Avalonia.Controls.PdfViewer.SelectedShapeType), Avalonia.Controls.PdfViewerTool.None disarms every tool. Editing capability still applies: while Avalonia.Controls.PdfViewer.CanEditAnnotations is false the value stays Avalonia.Controls.PdfViewerTool.None.
ActualThemeVariantGets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty. Inherited from StyledElement.
AddBookmarkCommandGets a command that bookmarks the page supplied as the command parameter (defaulting to the current page). Enabled while a document is loaded.
AllowAnnotationEditingGets or sets whether annotation tools may be used. Default true. Ignored (treated as false) when Avalonia.Controls.PdfViewer.IsReadOnly is set.
AllowDocumentSavingGets or sets whether the built-in save command/UI is available. Default true. Programmatic Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) is unaffected.
AllowFormEditingGets or sets whether interactive form fields accept input. Default true. Ignored (treated as false) when Avalonia.Controls.PdfViewer.IsReadOnly is set.
AllowTextSelectionGets or sets whether the user can select (and copy) text. Default true.
AnnotationModeGets or sets the annotation interaction mode.
AutoSaveGets or sets whether the document is automatically saved after annotation changes. Requires Avalonia.Controls.PdfViewer.Source to be set (file-path based loading).
BackgroundGets or sets the brush used to draw the control's background. Inherited from TemplatedControl.
BackgroundSizingGets or sets how the control's background is drawn relative to the control's border. Inherited from TemplatedControl.
BookmarksGets the current user bookmarks, ordered by page. These are saved reading positions, distinct from the document outline (Avalonia.Controls.PdfViewer.HasOutline). Persisted to the document's XMP metadata in the Preview-compatible apple-preview format.
BorderBrushGets or sets the brush used to draw the control's border. Inherited from TemplatedControl.
BorderThicknessGets or sets the thickness of the control's border. Inherited from TemplatedControl.
BoundsGets the bounds of the control relative to its parent. Inherited from Visual.
CacheModeGets or sets the cache mode of the visual. Inherited from Visual.
CanEditAnnotationsGets whether annotation editing is currently permitted — when Avalonia.Controls.PdfViewer.IsReadOnly is set or Avalonia.Controls.PdfViewer.AllowAnnotationEditing is cleared. Bindable so the template can gate the annotation toolbar.
CanPrintTrue when a document is loaded and printing can go somewhere: either Avalonia.Controls.PdfViewer.PrintRequested has a handler or a supported Avalonia.Controls.PdfViewer.PrintService exists.
CanRedoGets whether there is an undone edit that Avalonia.Controls.PdfViewer.Redo can re-apply.
CanShareTrue when a document is loaded and sharing can go somewhere: either Avalonia.Controls.PdfViewer.ShareRequested has a handler or a supported Avalonia.Controls.PdfViewer.ShareService exists.
CanUndoGets whether there is an edit that Avalonia.Controls.PdfViewer.Undo can revert. Bindable so a host or template can enable an Undo button.
ClassesGets or sets the styled element's classes. Inherited from StyledElement.
ClipGets or sets the geometry clip for this visual. Inherited from Visual.
ClipToBoundsGets or sets a value indicating whether the control should be clipped to its bounds. Inherited from Visual.
ContextFlyoutGets or sets a context flyout to the control Inherited from Control.
ContextMenuGets or sets a context menu to the control. Inherited from Control.
CopyCommandGets a command that copies the current text selection to the clipboard.
CornerRadiusGets or sets the radius of the border rounded corners. Inherited from TemplatedControl.
CurrentPageGets or sets the current page number (1-based).
CurrentSearchResultIndexGets the 0-based index of the active search match, or -1 when there are none.
CursorGets or sets associated mouse cursor. Inherited from InputElement.
DataContextGets or sets the control's data context. Inherited from StyledElement.
DataTemplatesGets or sets the data templates for the control. Inherited from Control.
DesiredSizeGets the size that this element computed during the measure pass of the layout process. Inherited from Layoutable.
DismissErrorCommandGets a command that clears Avalonia.Controls.PdfViewer.ErrorMessage. Enabled while an error is shown.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
DocumentSourceGets or sets the document to display, accepting a string file path, a Uri (file scheme), a System.IO.Stream, or a byte array. This is the binding-friendly alternative to Avalonia.Controls.PdfViewer.Source; assigning it loads the document immediately. Setting it to null closes the current document.
DrawStrokeColorGets or sets the default draw/ink stroke color.
DrawStrokeWidthGets or sets the draw stroke width in PDF points (0.5–20).
EffectGets or sets the effect of the control. Inherited from Visual.
EnableKeyboardShortcutsGets or sets whether the viewer handles its built-in keyboard shortcuts — copy, select-all, the zoom accelerators, save, arrow-key navigation and nudging. Default true. Set false when a host binds those keystrokes to its own commands and doesn't want the viewer to consume them. Form-field text input and Escape-to-deselect are unaffected.
ErrorMessageGets the current error message, if any.
FitPageCommandGets a command that fits the whole page to the viewport.
FitWidthCommandGets a command that fits the page width to the viewport.
FlowDirectionGets or sets the text flow direction. Inherited from Visual.
FocusableGets or sets a value indicating whether the control can receive focus. Inherited from InputElement.
FocusAdornerGets or sets the control's focus adorner. Inherited from Control.
FontFamilyGets or sets the font family used to draw the control's text. Inherited from TemplatedControl.
FontFeaturesGets or sets the font features turned on/off. Inherited from TemplatedControl.
FontSizeGets or sets the size of the control's text in points. Inherited from TemplatedControl.
FontStretchGets or sets the font stretch used to draw the control's text. Inherited from TemplatedControl.
FontStyleGets or sets the font style used to draw the control's text. Inherited from TemplatedControl.
FontWeightGets or sets the font weight used to draw the control's text. Inherited from TemplatedControl.
ForegroundGets or sets the brush used to draw the control's text and other foreground elements. Inherited from TemplatedControl.
GestureRecognizersInherited from InputElement.
GoToPageCommandGets a command that navigates to the page number supplied as the command parameter (an int or a string parseable as one).
HasBookmarksGets whether the document has bookmarks.
HasDocumentGets whether a document is currently open. The template uses it to show errors as a dismissible banner over an open document instead of the full-canvas error state.
HasMirrorTransformGets or sets a value indicating whether to apply mirror transform on this control. Inherited from Visual.
HasOutlineGets whether the document has an outline (table of contents).
HasSelectionGets whether there is an active text selection.
HeightGets or sets the height of the element. Inherited from Layoutable.
HighlightColorGets or sets the default highlight annotation color.
HorizontalAlignmentGets or sets the element's preferred horizontal alignment in its parent. Inherited from Layoutable.
IncludeStampDateGets or sets whether stamps added from now on carry the current date as a second line (see Avalonia.Controls.PdfViewer.StampDateFormat). The Stamp dropdown's "Include date" toggle sets this too. Default . Existing stamps keep their date, or their lack of one.
IsArrangeValidGets a value indicating whether the control's layouts arrange is valid. Inherited from Layoutable.
IsArrowKeyNudgeEnabledGets or sets whether the arrow keys move the selected annotation by one pixel (ten with Shift) instead of navigating. Default true. With no annotation selected the arrow keys always navigate. Also off when Avalonia.Controls.PdfViewer.EnableKeyboardShortcuts is false.
IsBookmarksEnabledGets or sets whether the Bookmarks sidebar pane is available. When its tab is hidden and the mode can't be selected. Default .
IsDirtyGets whether the document has edits (annotations, form values, redactions, bookmarks) that have not been written since it was loaded or last saved. Cleared by a successful Avalonia.Controls.PdfViewer.SaveAsync, Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) or auto-save and by loading another document. Undoing back to the saved state does not clear it.
IsDrawToolVisibleGets or sets whether the Draw (ink) tool is shown. Default .
IsEffectivelyEnabledGets a value indicating whether this control and all its parents are enabled. Inherited from InputElement.
IsEffectivelyVisibleGets a value indicating whether this control and all its parents are visible. Inherited from Visual.
IsEnabledGets or sets a value indicating whether the control is enabled for user interaction. Inherited from InputElement.
IsFocusedGets a value indicating whether the control is focused. Inherited from InputElement.
IsHighlightToolVisibleGets or sets whether the Highlight tool is shown. Default .
IsHitTestVisibleGets or sets a value indicating whether the control is considered for hit testing. Inherited from InputElement.
IsInitializedGets a value that indicates whether the element has finished initialization. Inherited from StyledElement.
IsKeyboardFocusWithinGets a value indicating whether keyboard focus is anywhere within the element or its visual tree child elements. Inherited from InputElement.
IsLinkToolVisibleGets or sets whether the Link tool is shown. Default .
IsLoadedGets a value indicating whether the control is fully constructed in the visual tree and both layout and render are complete. Inherited from Control.
IsLoadingGets whether the control is currently loading a document.
IsMeasureValidGets a value indicating whether the control's layout measure is valid. Inherited from Layoutable.
IsMobileLayoutGets whether the touch-optimised mobile layout is used. When true, the annotation tools are relocated from the centre of the top toolbar to a dedicated bar along the bottom of the control; the search field, page navigation and menu stay in the top toolbar. The control manages this automatically — true on iOS/Android, or on any platform when the control is narrower than 500 device-independent pixels — recomputing as it resizes, so any value set externally is transient.
IsMoreOptionsVisibleGets or sets whether the toolbar's More Options menu (print, share, view modes) is shown.
IsNoteToolVisibleGets or sets whether the Note (sticky note) tool is shown. Default .
IsOpenVisibleGets or sets whether an Open entry is offered at the top of the More Options menu. Off by default: most hosts load documents themselves. The entry runs Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken).
IsPointerOverGets a value indicating whether the pointer is currently over the control. Inherited from InputElement.
IsPrintVisibleGets or sets whether the Print entry is offered in the More Options menu. Even when true the entry is hidden on platforms without a print service unless Avalonia.Controls.PdfViewer.PrintRequested is handled.
IsReadOnlyGets or sets a value that, when true, disables all document editing (annotation tools and form input). Text selection and navigation remain available.
IsRedactionUndoEnabledGets or sets whether redactions are recorded in the undo history. When false a redaction is final as soon as it is applied and holds no document copy; other edits stay undoable. Defaults to true.
IsRedactToolVisibleGets or sets whether the Redact tool is shown. Default .
IsSaveAsVisibleGets or sets whether a Save As entry is offered in the More Options menu. Off by default. The entry runs Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken).
IsSaveVisibleGets or sets whether a Save entry (save in place, see Avalonia.Controls.PdfViewer.SaveAsync) is offered in the More Options menu. Off by default; hidden anyway while Avalonia.Controls.PdfViewer.AllowDocumentSaving is false.
IsShapeToolVisibleGets or sets whether the Shapes tool is shown. Default .
IsShareVisibleGets or sets whether the Share entry is offered in the More Options menu. Even when true the entry is hidden on platforms without a share service unless Avalonia.Controls.PdfViewer.ShareRequested is handled.
IsSidebarOpenGets whether the sidebar is open (any mode other than None).
IsSidebarVisibleGets or sets whether the sidebar is visible (including collapsed state). When false, the sidebar is completely hidden and cannot be toggled.
IsSquigglyToolVisibleGets or sets whether the Squiggly tool is shown. Default .
IsStampToolVisibleGets or sets whether the Stamp dropdown is shown in the toolbar. Default .
IsStrikethroughToolVisibleGets or sets whether the Strikethrough tool is shown. Default .
IsTableOfContentsEnabledGets or sets whether the Table of Contents sidebar pane is available. When its tab is hidden and the mode can't be selected. Default .
IsTabStopGets or sets a value that indicates whether the control is included in tab navigation. Inherited from InputElement.
IsTextToolVisibleGets or sets whether the Add Text (free text) tool is shown. Default .
IsToolbarVisibleGets or sets whether the toolbar is visible.
IsUnderlineToolVisibleGets or sets whether the Underline tool is shown. Default .
IsVisibleGets or sets a value indicating whether this control is visible. Inherited from Visual.
ItemInherited from AvaloniaObject.
KeyBindingsInherited from InputElement.
LetterSpacingGets or sets the letter spacing for the control's text content. Inherited from TemplatedControl.
MarginGets or sets the margin around the element. Inherited from Layoutable.
MaxHeightGets or sets the maximum height of the element. Inherited from Layoutable.
MaxRedactionUndoStepsGets or sets how many redactions can be undone (0–100). A redaction rewrites page content, so each undo step keeps a serialized copy of the whole document as it was; this limit bounds that memory separately from Avalonia.Controls.PdfViewer.MaxUndoSteps. The most recent redactions are kept: when the limit is exceeded the oldest redaction step is dropped from the history while the annotation steps around it stay. Zero records no redactions. Defaults to 10.
MaxRenderScaleGets or sets the maximum device-pixel ratio the page raster is rendered at. Pages are rendered at ZoomLevel × clamp(screenScaling, 1, MaxRenderScale) pixels so text stays crisp on HiDPI displays. Higher values are sharper but use more memory (bitmap bytes scale with the square of the ratio); set to 1.0 to disable DPI-aware rendering. Default 2.0.
MaxUndoStepsGets or sets how many undo steps are retained (0–1000). Lowering it trims the oldest history. Zero disables undo/redo entirely. Defaults to 100.
MaxWidthGets or sets the maximum width of the element. Inherited from Layoutable.
MaxZoomGets or sets the maximum allowed Avalonia.Controls.PdfViewer.ZoomLevel (1.0 == 100%). Default 5.0, at most Avalonia.Controls.PdfViewer.MaxZoomLimit.
MetadataGets the loaded document's metadata, or null when no document is open.
MinHeightGets or sets the minimum height of the element. Inherited from Layoutable.
MinWidthGets or sets the minimum width of the element. Inherited from Layoutable.
MinZoomGets or sets the minimum allowed Avalonia.Controls.PdfViewer.ZoomLevel (1.0 == 100%). Default 0.05.
NameGets or sets the name of the styled element. Inherited from StyledElement.
NextPageCommandGets a command that advances to the next page. Disabled on the last page.
NoteColorGets or sets the default note color.
OpacityGets or sets the opacity of the control. Inherited from Visual.
OpacityMaskGets or sets the opacity mask of the control. Inherited from Visual.
OpenCommandGets a command that opens a document via Avalonia.Controls.PdfViewer.Open (file picker or Avalonia.Controls.PdfViewer.OpenRequested).
PaddingGets or sets the padding placed between the border of the control and its content. Inherited from TemplatedControl.
PageCountGets the total number of pages in the document.
PageRenderBufferGets or sets how many pages on each side of the viewport are decoded ahead of time in continuous mode. Higher values reduce blank placeholders while scrolling at the cost of memory; lower values minimize memory. Clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRenderBuffer]. Default is 2.
PageRetentionBufferGets or sets how many pages on each side of the viewport are kept decoded before being evicted in continuous mode. Acts as hysteresis: pages between the render buffer and this margin stay in memory so short back-and-forth scrolling does not re-render them. If set below Avalonia.Controls.PdfViewer.PageRenderBuffer, the render buffer is used for retention. Clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRetentionBuffer]. Default is 4.
ParentGets the styled element's logical parent. Inherited from StyledElement.
PasswordGets or sets the password for encrypted PDFs.
PermissionsGets the loaded document's permission flags, or null when no document is open.
PreviousPageCommandGets a command that goes to the previous page. Disabled on the first page.
PrintCommandGets a command that prints the document via the configured Avalonia.Controls.PdfViewer.PrintService. Disabled when no print service is set.
PrintServiceGets or sets the print service used by Avalonia.Controls.PdfViewer.Print, Avalonia.Controls.PdfViewer.PrintAsync(Avalonia.Controls.Pdf.Services.PrintOptions,System.Threading.CancellationToken) and Avalonia.Controls.PdfViewer.PrintCommand. While the property is unset it resolves to the built-in service for the current platform (Windows, macOS, iOS, Android; null elsewhere). Assign or bind your own implementation to replace it, set null to disable the built-in one, or clear the property to return to the platform default. Handle Avalonia.Controls.PdfViewer.PrintRequested to bypass the service entirely.
RedactionRemovesHiddenInformationGets or sets whether a redaction also removes the places a document keeps copies of its content outside the page: the tagged structure tree (with its /ActualText and /Alt text), the redacted page's embedded thumbnail, and the XMP and Info metadata (title, author, keywords). Default true. Objects nothing references any more are dropped either way. Outline titles and file attachments are never touched.
RemoveBookmarkCommandGets a command that removes the bookmark for the page supplied as the command parameter (defaulting to the current page). Enabled while a document is loaded.
RenderTransformGets or sets the render transform of the control. Inherited from Visual.
RenderTransformOriginGets or sets the transform origin of the control. Inherited from Visual.
ResetZoomCommandGets a command that resets the zoom to 100%. Enabled while a document is loaded.
ResourcesGets or sets the styled element's resource dictionary. Inherited from StyledElement.
RespectDocumentPermissionsGets or sets whether the document's own permission flags (Avalonia.Controls.PdfViewer.Permissions, the encryption dictionary's /P entry) restrict what the viewer offers: annotation editing, form filling, text selection and printing are each withheld when the document forbids them. Default true. A document opened with its owner password is unrestricted. Set false to ignore the flags, as an owner's own tooling might.
SaveAsCommandGets a command that saves to a chosen file via Avalonia.Controls.PdfViewer.SaveAs.
SaveCommandGets a command that saves the document in place. Honors Avalonia.Controls.PdfViewer.AllowDocumentSaving.
SearchMatchCaseGets or sets whether the toolbar search matches letter case. Default false.
SearchMatchWholeWordGets or sets whether the toolbar search matches whole words only. Default false.
SearchQueryGets or sets the search query.
SearchResultCountGets the number of matches for the current search.
SearchResultsGets the current search results.
SelectAllCommandGets a command that selects all text on the current page.
SelectedShapeTypeGets or sets the active shape tool type.
SelectedTextGets the currently selected text.
SetToolCommandGets a command that activates a tool: the parameter is a Avalonia.Controls.PdfViewerTool (or its name). Lets a host with its own toolbar drive the same tools as the built-in one.
ShapeFillColorGets or sets the default shape fill color. Null means no fill.
ShapeStrokeColorGets or sets the default shape stroke color. Null means no stroke.
ShapeStrokeWidthGets or sets the default shape stroke width in PDF points (0.5–20).
ShapeSubtypeModeGets or sets how shapes are written to the file: with their standard subtypes so other readers can edit them, or as stamps that survive other editors untouched. See Avalonia.Controls.PdfShapeSubtypeMode. Default Avalonia.Controls.PdfShapeSubtypeMode.Auto.
ShareCommandGets a command that shares the document via the configured Avalonia.Controls.PdfViewer.ShareService or a Avalonia.Controls.PdfViewer.ShareRequested handler. Disabled when neither is available.
ShareServiceGets or sets the share service used by Avalonia.Controls.PdfViewer.Share, Avalonia.Controls.PdfViewer.ShareAsync(Avalonia.Controls.Pdf.Services.ShareOptions,System.Threading.CancellationToken) and Avalonia.Controls.PdfViewer.ShareCommand. Same semantics as Avalonia.Controls.PdfViewer.PrintService: unset resolves to the platform service, null disables it, clearing the property restores the default.
ShowBookmarkIndicatorsGets or sets whether a bookmark ribbon is drawn in the top-right corner of bookmarked pages. Defaults to .
SidebarModeGets or sets the sidebar mode.
SidebarPlacementGets or sets how the sidebar sits relative to the document. Avalonia.Controls.SidebarPlacement.Auto (default) mirrors the toolbar layout — overlay on mobile, offset on desktop; Avalonia.Controls.SidebarPlacement.Overlay floats it over a centered document; Avalonia.Controls.SidebarPlacement.Offset shifts the document canvas right by the sidebar width so they don't overlap.
SidebarSelectionBrushOptional override for the selection colour used across all sidebar panes — table of contents, bookmarks, and the selected thumbnail. When set it replaces the theme's selection accent; when the theme default applies (accent-aware in Fluent, monotone in the Default theme). The contrasting foreground (text/chevron) is chosen automatically from the brush's luminance.
SidebarWidthGets or sets the sidebar width in DIPs (100–300).
SourceGets or sets the path to the PDF file to display.
SquigglyColorGets or sets the default squiggly underline annotation color.
StampColorGets or sets the colour used for every stamp. Null (the default) picks a colour by meaning: green for approvals and completions, blue for informational stamps, red for restrictions.
StampDateFormatGets or sets the .NET date format of a stamp's date line, formatted with the invariant culture and drawn in capitals. Default Avalonia.Controls.PdfViewer.DefaultStampDateFormat ("12 SEP 2026").
StampDateTextThe date line a stamp placed now would carry: today in Avalonia.Controls.PdfViewer.StampDateFormat, in capitals.
StampLabelsGets or sets the labels listed by the Stamp dropdown. A label is drawn in capitals and stored as the stamp's /Name with spaces removed ("Not Approved" becomes /NotApproved, one of the standard names). Default Avalonia.Controls.PdfViewer.DefaultStampLabels.
StampStyleGets or sets the look of stamps added from now on. See Avalonia.Controls.PdfStampStyle. Default Avalonia.Controls.PdfStampStyle.Classic. The Stamp dropdown's style selector sets this too. Existing stamps keep their own style.
StrikeoutColorGets or sets the default strikeout annotation color.
StringsGets or sets the user-facing texts of the viewer (tooltips, menus, dialogs, sidebar labels, placeholders, error banners). The template binds to it, so the toolbar follows a change at once; texts built in code (context menus, the Stamp dropdown, thumbnail labels) use the current value when they are next built. Set it before loading a document for a complete switch. Never null: assigning null restores Avalonia.Controls.PdfViewerStrings.Default.
StyleKeyGets the type by which the element is styled. Inherited from StyledElement.
StylesGets the styles for the styled element. Inherited from StyledElement.
TabIndexGets or sets a value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key. Inherited from InputElement.
TagGets or sets a user-defined object attached to the control. Inherited from Control.
TemplateGets or sets the template that defines the control's appearance. Inherited from TemplatedControl.
TemplatedParentGets the styled element whose lookless template this styled element is part of. Inherited from StyledElement.
TextAnnotationFillColorGets or sets the text annotation fill color. Null means no fill.
TextAnnotationFontGets or sets the text annotation font name.
TextAnnotationFontAttributesGets or sets the text annotation font attributes.
TextAnnotationFontSizeGets or sets the text annotation font size (1–144).
TextAnnotationStrokeColorGets or sets the text annotation stroke color. Null means no stroke.
TextAnnotationStrokeWidthGets or sets the text annotation stroke width (0.5–20).
TextAnnotationTextAlignGets or sets the text annotation text alignment.
TextAnnotationTextColorGets or sets the text annotation text color.
ThemeGets or sets the theme to be applied to the element. Inherited from StyledElement.
ToggleBookmarkCommandGets a command that toggles the bookmark for the page supplied as the command parameter (an int or a string parseable as one), or the current page when no parameter is given. Mirrors the ⌘D / Ctrl+D shortcut.
ToolbarLayoutModeGets or sets how the toolbar layout is chosen. Avalonia.Controls.PdfToolbarLayoutMode.Mobile or Avalonia.Controls.PdfToolbarLayoutMode.Desktop force that layout regardless of platform or width; Avalonia.Controls.PdfToolbarLayoutMode.Auto (default) decides from platform and available width. This is the supported way to force the touch toolbar; Avalonia.Controls.PdfViewer.IsMobileLayout is the resulting effective state.
TransitionsGets or sets the property transitions for the control. Inherited from Animatable.
UnderlineColorGets or sets the default underline annotation color.
UseLayoutRoundingGets or sets a value that determines whether the element should be snapped to pixel boundaries at layout time. Inherited from Layoutable.
VerticalAlignmentGets or sets the element's preferred vertical alignment in its parent. Inherited from Layoutable.
VerticalScrollOffsetGets or sets the vertical scroll offset of the page area, in device-independent pixels.
ViewModeGets or sets the view mode.
WidthGets or sets the width of the element. Inherited from Layoutable.
ZIndexGets or sets the Z index of the control. Inherited from Visual.
ZoomInCommandGets a command that zooms in one step. Enabled while a document is loaded.
ZoomLevelGets or sets the zoom level (1.0 = 100%).
ZoomModeGets or sets how pages are sized to the viewport. Fit modes recalculate Avalonia.Controls.PdfViewer.ZoomLevel on resize; Avalonia.Controls.PdfZoomMode.Manual leaves it fixed.
ZoomOutCommandGets a command that zooms out one step. Enabled while a document is loaded.
ZoomStepGets or sets the additive increment used by Avalonia.Controls.PdfViewer.ZoomIn / Avalonia.Controls.PdfViewer.ZoomOut. When 0 (the default), the built-in preset levels are used instead.

ActiveTool Property​

Gets or sets the tool applied to the next pointer gesture on a page. The built-in toolbar and a host's own controls both read and write this one value: setting it arms the tool (and, for Avalonia.Controls.PdfViewerTool.Shape, keeps or defaults Avalonia.Controls.PdfViewer.SelectedShapeType), Avalonia.Controls.PdfViewerTool.None disarms every tool. Editing capability still applies: while Avalonia.Controls.PdfViewer.CanEditAnnotations is false the value stays Avalonia.Controls.PdfViewerTool.None.

public Avalonia.Controls.PdfViewerTool ActiveTool { get; set; }

AddBookmarkCommand Property​

Gets a command that bookmarks the page supplied as the command parameter (defaulting to the current page). Enabled while a document is loaded.

public System.Windows.Input.ICommand AddBookmarkCommand { get; set; }

AllowAnnotationEditing Property​

Gets or sets whether annotation tools may be used. Default true. Ignored (treated as false) when Avalonia.Controls.PdfViewer.IsReadOnly is set.

public bool AllowAnnotationEditing { get; set; }

AllowDocumentSaving Property​

Gets or sets whether the built-in save command/UI is available. Default true. Programmatic Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) is unaffected.

public bool AllowDocumentSaving { get; set; }

AllowFormEditing Property​

Gets or sets whether interactive form fields accept input. Default true. Ignored (treated as false) when Avalonia.Controls.PdfViewer.IsReadOnly is set.

public bool AllowFormEditing { get; set; }

AllowTextSelection Property​

Gets or sets whether the user can select (and copy) text. Default true.

public bool AllowTextSelection { get; set; }

AnnotationMode Property​

Gets or sets the annotation interaction mode.

public Avalonia.Controls.AnnotationMode AnnotationMode { get; set; }

AutoSave Property​

Gets or sets whether the document is automatically saved after annotation changes. Requires Avalonia.Controls.PdfViewer.Source to be set (file-path based loading).

public bool AutoSave { get; set; }

Bookmarks Property​

Gets the current user bookmarks, ordered by page. These are saved reading positions, distinct from the document outline (Avalonia.Controls.PdfViewer.HasOutline). Persisted to the document's XMP metadata in the Preview-compatible apple-preview format.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfUserBookmark> Bookmarks { get; set; }

CanEditAnnotations Property​

Gets whether annotation editing is currently permitted — when Avalonia.Controls.PdfViewer.IsReadOnly is set or Avalonia.Controls.PdfViewer.AllowAnnotationEditing is cleared. Bindable so the template can gate the annotation toolbar.

public bool CanEditAnnotations { get; set; }

CanPrint Property​

True when a document is loaded and printing can go somewhere: either Avalonia.Controls.PdfViewer.PrintRequested has a handler or a supported Avalonia.Controls.PdfViewer.PrintService exists.

public bool CanPrint { get; set; }

CanRedo Property​

Gets whether there is an undone edit that Avalonia.Controls.PdfViewer.Redo can re-apply.

public bool CanRedo { get; set; }

CanShare Property​

True when a document is loaded and sharing can go somewhere: either Avalonia.Controls.PdfViewer.ShareRequested has a handler or a supported Avalonia.Controls.PdfViewer.ShareService exists.

public bool CanShare { get; set; }

CanUndo Property​

Gets whether there is an edit that Avalonia.Controls.PdfViewer.Undo can revert. Bindable so a host or template can enable an Undo button.

public bool CanUndo { get; set; }

CopyCommand Property​

Gets a command that copies the current text selection to the clipboard.

public System.Windows.Input.ICommand CopyCommand { get; set; }

CurrentPage Property​

Gets or sets the current page number (1-based).

public int CurrentPage { get; set; }

CurrentSearchResultIndex Property​

Gets the 0-based index of the active search match, or -1 when there are none.

public int CurrentSearchResultIndex { get; set; }

DismissErrorCommand Property​

Gets a command that clears Avalonia.Controls.PdfViewer.ErrorMessage. Enabled while an error is shown.

public System.Windows.Input.ICommand DismissErrorCommand { get; set; }

DocumentSource Property​

Gets or sets the document to display, accepting a string file path, a Uri (file scheme), a System.IO.Stream, or a byte array. This is the binding-friendly alternative to Avalonia.Controls.PdfViewer.Source; assigning it loads the document immediately. Setting it to null closes the current document.

public object DocumentSource { get; set; }

DrawStrokeColor Property​

Gets or sets the default draw/ink stroke color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor DrawStrokeColor { get; set; }

DrawStrokeWidth Property​

Gets or sets the draw stroke width in PDF points (0.5–20).

public float DrawStrokeWidth { get; set; }

EnableKeyboardShortcuts Property​

Gets or sets whether the viewer handles its built-in keyboard shortcuts — copy, select-all, the zoom accelerators, save, arrow-key navigation and nudging. Default true. Set false when a host binds those keystrokes to its own commands and doesn't want the viewer to consume them. Form-field text input and Escape-to-deselect are unaffected.

public bool EnableKeyboardShortcuts { get; set; }

ErrorMessage Property​

Gets the current error message, if any.

public string ErrorMessage { get; set; }

FitPageCommand Property​

Gets a command that fits the whole page to the viewport.

public System.Windows.Input.ICommand FitPageCommand { get; set; }

FitWidthCommand Property​

Gets a command that fits the page width to the viewport.

public System.Windows.Input.ICommand FitWidthCommand { get; set; }

GoToPageCommand Property​

Gets a command that navigates to the page number supplied as the command parameter (an int or a string parseable as one).

public System.Windows.Input.ICommand GoToPageCommand { get; set; }

HasBookmarks Property​

Gets whether the document has bookmarks.

public bool HasBookmarks { get; set; }

HasDocument Property​

Gets whether a document is currently open. The template uses it to show errors as a dismissible banner over an open document instead of the full-canvas error state.

public bool HasDocument { get; set; }

HasOutline Property​

Gets whether the document has an outline (table of contents).

public bool HasOutline { get; set; }

HasSelection Property​

Gets whether there is an active text selection.

public bool HasSelection { get; set; }

HighlightColor Property​

Gets or sets the default highlight annotation color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor HighlightColor { get; set; }

IncludeStampDate Property​

Gets or sets whether stamps added from now on carry the current date as a second line (see Avalonia.Controls.PdfViewer.StampDateFormat). The Stamp dropdown's "Include date" toggle sets this too. Default . Existing stamps keep their date, or their lack of one.

public bool IncludeStampDate { get; set; }

IsArrowKeyNudgeEnabled Property​

Gets or sets whether the arrow keys move the selected annotation by one pixel (ten with Shift) instead of navigating. Default true. With no annotation selected the arrow keys always navigate. Also off when Avalonia.Controls.PdfViewer.EnableKeyboardShortcuts is false.

public bool IsArrowKeyNudgeEnabled { get; set; }

IsBookmarksEnabled Property​

Gets or sets whether the Bookmarks sidebar pane is available. When its tab is hidden and the mode can't be selected. Default .

public bool IsBookmarksEnabled { get; set; }

IsDirty Property​

Gets whether the document has edits (annotations, form values, redactions, bookmarks) that have not been written since it was loaded or last saved. Cleared by a successful Avalonia.Controls.PdfViewer.SaveAsync, Avalonia.Controls.PdfViewer.SaveDocumentAsync(System.IO.Stream) or auto-save and by loading another document. Undoing back to the saved state does not clear it.

public bool IsDirty { get; set; }

IsDrawToolVisible Property​

Gets or sets whether the Draw (ink) tool is shown. Default .

public bool IsDrawToolVisible { get; set; }

IsHighlightToolVisible Property​

Gets or sets whether the Highlight tool is shown. Default .

public bool IsHighlightToolVisible { get; set; }

IsLinkToolVisible Property​

Gets or sets whether the Link tool is shown. Default .

public bool IsLinkToolVisible { get; set; }

IsLoading Property​

Gets whether the control is currently loading a document.

public bool IsLoading { get; set; }

IsMobileLayout Property​

Gets whether the touch-optimised mobile layout is used. When true, the annotation tools are relocated from the centre of the top toolbar to a dedicated bar along the bottom of the control; the search field, page navigation and menu stay in the top toolbar. The control manages this automatically — true on iOS/Android, or on any platform when the control is narrower than 500 device-independent pixels — recomputing as it resizes, so any value set externally is transient.

public bool IsMobileLayout { get; set; }

IsMoreOptionsVisible Property​

Gets or sets whether the toolbar's More Options menu (print, share, view modes) is shown.

public bool IsMoreOptionsVisible { get; set; }

IsNoteToolVisible Property​

Gets or sets whether the Note (sticky note) tool is shown. Default .

public bool IsNoteToolVisible { get; set; }

IsOpenVisible Property​

Gets or sets whether an Open entry is offered at the top of the More Options menu. Off by default: most hosts load documents themselves. The entry runs Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken).

public bool IsOpenVisible { get; set; }

IsPrintVisible Property​

Gets or sets whether the Print entry is offered in the More Options menu. Even when true the entry is hidden on platforms without a print service unless Avalonia.Controls.PdfViewer.PrintRequested is handled.

public bool IsPrintVisible { get; set; }

IsReadOnly Property​

Gets or sets a value that, when true, disables all document editing (annotation tools and form input). Text selection and navigation remain available.

public bool IsReadOnly { get; set; }

IsRedactionUndoEnabled Property​

Gets or sets whether redactions are recorded in the undo history. When false a redaction is final as soon as it is applied and holds no document copy; other edits stay undoable. Defaults to true.

public bool IsRedactionUndoEnabled { get; set; }

IsRedactToolVisible Property​

Gets or sets whether the Redact tool is shown. Default .

public bool IsRedactToolVisible { get; set; }

IsSaveAsVisible Property​

Gets or sets whether a Save As entry is offered in the More Options menu. Off by default. The entry runs Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken).

public bool IsSaveAsVisible { get; set; }

IsSaveVisible Property​

Gets or sets whether a Save entry (save in place, see Avalonia.Controls.PdfViewer.SaveAsync) is offered in the More Options menu. Off by default; hidden anyway while Avalonia.Controls.PdfViewer.AllowDocumentSaving is false.

public bool IsSaveVisible { get; set; }

IsShapeToolVisible Property​

Gets or sets whether the Shapes tool is shown. Default .

public bool IsShapeToolVisible { get; set; }

IsShareVisible Property​

Gets or sets whether the Share entry is offered in the More Options menu. Even when true the entry is hidden on platforms without a share service unless Avalonia.Controls.PdfViewer.ShareRequested is handled.

public bool IsShareVisible { get; set; }

IsSidebarOpen Property​

Gets whether the sidebar is open (any mode other than None).

public bool IsSidebarOpen { get; set; }

IsSidebarVisible Property​

Gets or sets whether the sidebar is visible (including collapsed state). When false, the sidebar is completely hidden and cannot be toggled.

public bool IsSidebarVisible { get; set; }

IsSquigglyToolVisible Property​

Gets or sets whether the Squiggly tool is shown. Default .

public bool IsSquigglyToolVisible { get; set; }

IsStampToolVisible Property​

Gets or sets whether the Stamp dropdown is shown in the toolbar. Default .

public bool IsStampToolVisible { get; set; }

IsStrikethroughToolVisible Property​

Gets or sets whether the Strikethrough tool is shown. Default .

public bool IsStrikethroughToolVisible { get; set; }

IsTableOfContentsEnabled Property​

Gets or sets whether the Table of Contents sidebar pane is available. When its tab is hidden and the mode can't be selected. Default .

public bool IsTableOfContentsEnabled { get; set; }

IsTextToolVisible Property​

Gets or sets whether the Add Text (free text) tool is shown. Default .

public bool IsTextToolVisible { get; set; }

IsToolbarVisible Property​

Gets or sets whether the toolbar is visible.

public bool IsToolbarVisible { get; set; }

IsUnderlineToolVisible Property​

Gets or sets whether the Underline tool is shown. Default .

public bool IsUnderlineToolVisible { get; set; }

MaxRedactionUndoSteps Property​

Gets or sets how many redactions can be undone (0–100). A redaction rewrites page content, so each undo step keeps a serialized copy of the whole document as it was; this limit bounds that memory separately from Avalonia.Controls.PdfViewer.MaxUndoSteps. The most recent redactions are kept: when the limit is exceeded the oldest redaction step is dropped from the history while the annotation steps around it stay. Zero records no redactions. Defaults to 10.

public int MaxRedactionUndoSteps { get; set; }

MaxRenderScale Property​

Gets or sets the maximum device-pixel ratio the page raster is rendered at. Pages are rendered at ZoomLevel × clamp(screenScaling, 1, MaxRenderScale) pixels so text stays crisp on HiDPI displays. Higher values are sharper but use more memory (bitmap bytes scale with the square of the ratio); set to 1.0 to disable DPI-aware rendering. Default 2.0.

public double MaxRenderScale { get; set; }

MaxUndoSteps Property​

Gets or sets how many undo steps are retained (0–1000). Lowering it trims the oldest history. Zero disables undo/redo entirely. Defaults to 100.

public int MaxUndoSteps { get; set; }

MaxZoom Property​

Gets or sets the maximum allowed Avalonia.Controls.PdfViewer.ZoomLevel (1.0 == 100%). Default 5.0, at most Avalonia.Controls.PdfViewer.MaxZoomLimit.

public double MaxZoom { get; set; }

Metadata Property​

Gets the loaded document's metadata, or null when no document is open.

public Avalonia.Controls.Pdf.Core.PdfMetadata Metadata { get; set; }

MinZoom Property​

Gets or sets the minimum allowed Avalonia.Controls.PdfViewer.ZoomLevel (1.0 == 100%). Default 0.05.

public double MinZoom { get; set; }

NextPageCommand Property​

Gets a command that advances to the next page. Disabled on the last page.

public System.Windows.Input.ICommand NextPageCommand { get; set; }

NoteColor Property​

Gets or sets the default note color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor NoteColor { get; set; }

OpenCommand Property​

Gets a command that opens a document via Avalonia.Controls.PdfViewer.Open (file picker or Avalonia.Controls.PdfViewer.OpenRequested).

public System.Windows.Input.ICommand OpenCommand { get; set; }

PageCount Property​

Gets the total number of pages in the document.

public int PageCount { get; set; }

PageRenderBuffer Property​

Gets or sets how many pages on each side of the viewport are decoded ahead of time in continuous mode. Higher values reduce blank placeholders while scrolling at the cost of memory; lower values minimize memory. Clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRenderBuffer]. Default is 2.

public int PageRenderBuffer { get; set; }

PageRetentionBuffer Property​

Gets or sets how many pages on each side of the viewport are kept decoded before being evicted in continuous mode. Acts as hysteresis: pages between the render buffer and this margin stay in memory so short back-and-forth scrolling does not re-render them. If set below Avalonia.Controls.PdfViewer.PageRenderBuffer, the render buffer is used for retention. Clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRetentionBuffer]. Default is 4.

public int PageRetentionBuffer { get; set; }

Password Property​

Gets or sets the password for encrypted PDFs.

public string Password { get; set; }

Permissions Property​

Gets the loaded document's permission flags, or null when no document is open.

public Nullable<Avalonia.Controls.PdfPermissions> Permissions { get; set; }

PreviousPageCommand Property​

Gets a command that goes to the previous page. Disabled on the first page.

public System.Windows.Input.ICommand PreviousPageCommand { get; set; }

PrintCommand Property​

Gets a command that prints the document via the configured Avalonia.Controls.PdfViewer.PrintService. Disabled when no print service is set.

public System.Windows.Input.ICommand PrintCommand { get; set; }

PrintService Property​

Gets or sets the print service used by Avalonia.Controls.PdfViewer.Print, Avalonia.Controls.PdfViewer.PrintAsync(Avalonia.Controls.Pdf.Services.PrintOptions,System.Threading.CancellationToken) and Avalonia.Controls.PdfViewer.PrintCommand. While the property is unset it resolves to the built-in service for the current platform (Windows, macOS, iOS, Android; null elsewhere). Assign or bind your own implementation to replace it, set null to disable the built-in one, or clear the property to return to the platform default. Handle Avalonia.Controls.PdfViewer.PrintRequested to bypass the service entirely.

public Avalonia.Controls.Pdf.Services.IPrintService PrintService { get; set; }

RedactionRemovesHiddenInformation Property​

Gets or sets whether a redaction also removes the places a document keeps copies of its content outside the page: the tagged structure tree (with its /ActualText and /Alt text), the redacted page's embedded thumbnail, and the XMP and Info metadata (title, author, keywords). Default true. Objects nothing references any more are dropped either way. Outline titles and file attachments are never touched.

public bool RedactionRemovesHiddenInformation { get; set; }

RemoveBookmarkCommand Property​

Gets a command that removes the bookmark for the page supplied as the command parameter (defaulting to the current page). Enabled while a document is loaded.

public System.Windows.Input.ICommand RemoveBookmarkCommand { get; set; }

ResetZoomCommand Property​

Gets a command that resets the zoom to 100%. Enabled while a document is loaded.

public System.Windows.Input.ICommand ResetZoomCommand { get; set; }

RespectDocumentPermissions Property​

Gets or sets whether the document's own permission flags (Avalonia.Controls.PdfViewer.Permissions, the encryption dictionary's /P entry) restrict what the viewer offers: annotation editing, form filling, text selection and printing are each withheld when the document forbids them. Default true. A document opened with its owner password is unrestricted. Set false to ignore the flags, as an owner's own tooling might.

public bool RespectDocumentPermissions { get; set; }

SaveAsCommand Property​

Gets a command that saves to a chosen file via Avalonia.Controls.PdfViewer.SaveAs.

public System.Windows.Input.ICommand SaveAsCommand { get; set; }

SaveCommand Property​

Gets a command that saves the document in place. Honors Avalonia.Controls.PdfViewer.AllowDocumentSaving.

public System.Windows.Input.ICommand SaveCommand { get; set; }

SearchMatchCase Property​

Gets or sets whether the toolbar search matches letter case. Default false.

public bool SearchMatchCase { get; set; }

SearchMatchWholeWord Property​

Gets or sets whether the toolbar search matches whole words only. Default false.

public bool SearchMatchWholeWord { get; set; }

SearchQuery Property​

Gets or sets the search query.

public string SearchQuery { get; set; }

SearchResultCount Property​

Gets the number of matches for the current search.

public int SearchResultCount { get; set; }

SearchResults Property​

Gets the current search results.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult> SearchResults { get; set; }

SelectAllCommand Property​

Gets a command that selects all text on the current page.

public System.Windows.Input.ICommand SelectAllCommand { get; set; }

SelectedShapeType Property​

Gets or sets the active shape tool type.

public Avalonia.Controls.ShapeType SelectedShapeType { get; set; }

SelectedText Property​

Gets the currently selected text.

public string SelectedText { get; set; }

SetToolCommand Property​

Gets a command that activates a tool: the parameter is a Avalonia.Controls.PdfViewerTool (or its name). Lets a host with its own toolbar drive the same tools as the built-in one.

public System.Windows.Input.ICommand SetToolCommand { get; set; }

ShapeFillColor Property​

Gets or sets the default shape fill color. Null means no fill.

public Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> ShapeFillColor { get; set; }

ShapeStrokeColor Property​

Gets or sets the default shape stroke color. Null means no stroke.

public Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> ShapeStrokeColor { get; set; }

ShapeStrokeWidth Property​

Gets or sets the default shape stroke width in PDF points (0.5–20).

public float ShapeStrokeWidth { get; set; }

ShapeSubtypeMode Property​

Gets or sets how shapes are written to the file: with their standard subtypes so other readers can edit them, or as stamps that survive other editors untouched. See Avalonia.Controls.PdfShapeSubtypeMode. Default Avalonia.Controls.PdfShapeSubtypeMode.Auto.

public Avalonia.Controls.PdfShapeSubtypeMode ShapeSubtypeMode { get; set; }

ShareCommand Property​

Gets a command that shares the document via the configured Avalonia.Controls.PdfViewer.ShareService or a Avalonia.Controls.PdfViewer.ShareRequested handler. Disabled when neither is available.

public System.Windows.Input.ICommand ShareCommand { get; set; }

ShareService Property​

Gets or sets the share service used by Avalonia.Controls.PdfViewer.Share, Avalonia.Controls.PdfViewer.ShareAsync(Avalonia.Controls.Pdf.Services.ShareOptions,System.Threading.CancellationToken) and Avalonia.Controls.PdfViewer.ShareCommand. Same semantics as Avalonia.Controls.PdfViewer.PrintService: unset resolves to the platform service, null disables it, clearing the property restores the default.

public Avalonia.Controls.Pdf.Services.IShareService ShareService { get; set; }

ShowBookmarkIndicators Property​

Gets or sets whether a bookmark ribbon is drawn in the top-right corner of bookmarked pages. Defaults to .

public bool ShowBookmarkIndicators { get; set; }

SidebarMode Property​

Gets or sets the sidebar mode.

public Avalonia.Controls.SidebarMode SidebarMode { get; set; }

SidebarPlacement Property​

Gets or sets how the sidebar sits relative to the document. Avalonia.Controls.SidebarPlacement.Auto (default) mirrors the toolbar layout — overlay on mobile, offset on desktop; Avalonia.Controls.SidebarPlacement.Overlay floats it over a centered document; Avalonia.Controls.SidebarPlacement.Offset shifts the document canvas right by the sidebar width so they don't overlap.

public Avalonia.Controls.SidebarPlacement SidebarPlacement { get; set; }

SidebarSelectionBrush Property​

Optional override for the selection colour used across all sidebar panes — table of contents, bookmarks, and the selected thumbnail. When set it replaces the theme's selection accent; when the theme default applies (accent-aware in Fluent, monotone in the Default theme). The contrasting foreground (text/chevron) is chosen automatically from the brush's luminance.

public Avalonia.Media.IBrush SidebarSelectionBrush { get; set; }

SidebarWidth Property​

Gets or sets the sidebar width in DIPs (100–300).

public double SidebarWidth { get; set; }

Source Property​

Gets or sets the path to the PDF file to display.

public string Source { get; set; }

SquigglyColor Property​

Gets or sets the default squiggly underline annotation color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor SquigglyColor { get; set; }

StampColor Property​

Gets or sets the colour used for every stamp. Null (the default) picks a colour by meaning: green for approvals and completions, blue for informational stamps, red for restrictions.

public Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> StampColor { get; set; }

StampDateFormat Property​

Gets or sets the .NET date format of a stamp's date line, formatted with the invariant culture and drawn in capitals. Default Avalonia.Controls.PdfViewer.DefaultStampDateFormat ("12 SEP 2026").

public string StampDateFormat { get; set; }

StampDateText Property​

The date line a stamp placed now would carry: today in Avalonia.Controls.PdfViewer.StampDateFormat, in capitals.

public string StampDateText { get; set; }

StampLabels Property​

Gets or sets the labels listed by the Stamp dropdown. A label is drawn in capitals and stored as the stamp's /Name with spaces removed ("Not Approved" becomes /NotApproved, one of the standard names). Default Avalonia.Controls.PdfViewer.DefaultStampLabels.

public System.Collections.Generic.IReadOnlyList<string> StampLabels { get; set; }

StampStyle Property​

Gets or sets the look of stamps added from now on. See Avalonia.Controls.PdfStampStyle. Default Avalonia.Controls.PdfStampStyle.Classic. The Stamp dropdown's style selector sets this too. Existing stamps keep their own style.

public Avalonia.Controls.PdfStampStyle StampStyle { get; set; }

StrikeoutColor Property​

Gets or sets the default strikeout annotation color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor StrikeoutColor { get; set; }

Strings Property​

Gets or sets the user-facing texts of the viewer (tooltips, menus, dialogs, sidebar labels, placeholders, error banners). The template binds to it, so the toolbar follows a change at once; texts built in code (context menus, the Stamp dropdown, thumbnail labels) use the current value when they are next built. Set it before loading a document for a complete switch. Never null: assigning null restores Avalonia.Controls.PdfViewerStrings.Default.

public Avalonia.Controls.PdfViewerStrings Strings { get; set; }

TextAnnotationFillColor Property​

Gets or sets the text annotation fill color. Null means no fill.

public Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> TextAnnotationFillColor { get; set; }

TextAnnotationFont Property​

Gets or sets the text annotation font name.

public string TextAnnotationFont { get; set; }

TextAnnotationFontAttributes Property​

Gets or sets the text annotation font attributes.

public Avalonia.Controls.FontAttributes TextAnnotationFontAttributes { get; set; }

TextAnnotationFontSize Property​

Gets or sets the text annotation font size (1–144).

public float TextAnnotationFontSize { get; set; }

TextAnnotationStrokeColor Property​

Gets or sets the text annotation stroke color. Null means no stroke.

public Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> TextAnnotationStrokeColor { get; set; }

TextAnnotationStrokeWidth Property​

Gets or sets the text annotation stroke width (0.5–20).

public float TextAnnotationStrokeWidth { get; set; }

TextAnnotationTextAlign Property​

Gets or sets the text annotation text alignment.

public Avalonia.Controls.TextAnnotationAlignment TextAnnotationTextAlign { get; set; }

TextAnnotationTextColor Property​

Gets or sets the text annotation text color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor TextAnnotationTextColor { get; set; }

ToggleBookmarkCommand Property​

Gets a command that toggles the bookmark for the page supplied as the command parameter (an int or a string parseable as one), or the current page when no parameter is given. Mirrors the ⌘D / Ctrl+D shortcut.

public System.Windows.Input.ICommand ToggleBookmarkCommand { get; set; }

ToolbarLayoutMode Property​

Gets or sets how the toolbar layout is chosen. Avalonia.Controls.PdfToolbarLayoutMode.Mobile or Avalonia.Controls.PdfToolbarLayoutMode.Desktop force that layout regardless of platform or width; Avalonia.Controls.PdfToolbarLayoutMode.Auto (default) decides from platform and available width. This is the supported way to force the touch toolbar; Avalonia.Controls.PdfViewer.IsMobileLayout is the resulting effective state.

public Avalonia.Controls.PdfToolbarLayoutMode ToolbarLayoutMode { get; set; }

UnderlineColor Property​

Gets or sets the default underline annotation color.

public Avalonia.Controls.Pdf.Core.PdfAnnotationColor UnderlineColor { get; set; }

VerticalScrollOffset Property​

Gets or sets the vertical scroll offset of the page area, in device-independent pixels.

public double VerticalScrollOffset { get; set; }

ViewMode Property​

Gets or sets the view mode.

public Avalonia.Controls.PdfViewMode ViewMode { get; set; }

ZoomInCommand Property​

Gets a command that zooms in one step. Enabled while a document is loaded.

public System.Windows.Input.ICommand ZoomInCommand { get; set; }

ZoomLevel Property​

Gets or sets the zoom level (1.0 = 100%).

public double ZoomLevel { get; set; }

ZoomMode Property​

Gets or sets how pages are sized to the viewport. Fit modes recalculate Avalonia.Controls.PdfViewer.ZoomLevel on resize; Avalonia.Controls.PdfZoomMode.Manual leaves it fixed.

public Avalonia.Controls.PdfZoomMode ZoomMode { get; set; }

ZoomOutCommand Property​

Gets a command that zooms out one step. Enabled while a document is loaded.

public System.Windows.Input.ICommand ZoomOutCommand { get; set; }

ZoomStep Property​

Gets or sets the additive increment used by Avalonia.Controls.PdfViewer.ZoomIn / Avalonia.Controls.PdfViewer.ZoomOut. When 0 (the default), the built-in preset levels are used instead.

public double ZoomStep { get; set; }

Fields​

NameDescription
ActiveToolPropertyDefines the Avalonia.Controls.PdfViewer.ActiveTool property.
AllowAnnotationEditingPropertyDefines the Avalonia.Controls.PdfViewer.AllowAnnotationEditing property.
AllowDocumentSavingPropertyDefines the Avalonia.Controls.PdfViewer.AllowDocumentSaving property.
AllowFormEditingPropertyDefines the Avalonia.Controls.PdfViewer.AllowFormEditing property.
AllowTextSelectionPropertyDefines the Avalonia.Controls.PdfViewer.AllowTextSelection property.
AnnotatingClassAn annotation tool is active (Avalonia.Controls.PdfViewer.AnnotationMode is not None).
AnnotationModePropertyDefines the Avalonia.Controls.PdfViewer.AnnotationMode property.
AutoSavePropertyDefines the Avalonia.Controls.PdfViewer.AutoSave property.
BackgroundPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.Background property. Inherited from TemplatedControl.
BackgroundSizingPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.BackgroundSizing property. Inherited from TemplatedControl.
BorderBrushPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.BorderBrush property. Inherited from TemplatedControl.
BorderThicknessPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.BorderThickness property. Inherited from TemplatedControl.
BoundsPropertyDefines the Avalonia.Visual.Bounds property. Inherited from Visual.
CacheModePropertyDefines the Avalonia.Visual.CacheMode property. Inherited from Visual.
CanEditAnnotationsPropertyDefines the Avalonia.Controls.PdfViewer.CanEditAnnotations property.
CanRedoPropertyDefines the Avalonia.Controls.PdfViewer.CanRedo property.
CanUndoPropertyDefines the Avalonia.Controls.PdfViewer.CanUndo property.
ClipPropertyDefines the Avalonia.Visual.Clip property. Inherited from Visual.
ClipToBoundsPropertyDefines the Avalonia.Visual.ClipToBounds property. Inherited from Visual.
ContextCanceledEventProvides event data for the Avalonia.Input.InputElement.ContextCanceled event. Inherited from InputElement.
ContextFlyoutPropertyDefines the Avalonia.Controls.Control.ContextFlyout property Inherited from Control.
ContextMenuPropertyDefines the Avalonia.Controls.Control.ContextMenu property. Inherited from Control.
ContextRequestedEventProvides event data for the Avalonia.Input.InputElement.ContextRequested event. Inherited from InputElement.
CornerRadiusPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.CornerRadius property. Inherited from TemplatedControl.
CurrentPagePropertyDefines the Avalonia.Controls.PdfViewer.CurrentPage property.
CurrentSearchResultIndexPropertyDefines the Avalonia.Controls.PdfViewer.CurrentSearchResultIndex property.
CursorPropertyGets or sets associated mouse cursor. Inherited from InputElement.
DataContextPropertyDefines the Avalonia.StyledElement.DataContext property. Inherited from StyledElement.
DefaultStampDateFormatThe date format used by default for a stamp's date line ("12 SEP 2026").
DefaultStampLabelsThe stamp labels offered by default: the ISO 32000 standard names plus common extras.
DesiredSizePropertyDefines the Avalonia.Layout.Layoutable.DesiredSize property. Inherited from Layoutable.
DocumentSourcePropertyDefines the Avalonia.Controls.PdfViewer.DocumentSource property.
DoubleTappedEventDefines the Avalonia.Input.InputElement.DoubleTapped event. Inherited from InputElement.
DrawStrokeColorPropertyDefines the Avalonia.Controls.PdfViewer.DrawStrokeColor property.
DrawStrokeWidthPropertyDefines the Avalonia.Controls.PdfViewer.DrawStrokeWidth property.
EditingTextClassA free-text annotation is being edited in place.
EffectPropertyDefines the Avalonia.Visual.Effect property. Inherited from Visual.
EnableKeyboardShortcutsPropertyDefines the Avalonia.Controls.PdfViewer.EnableKeyboardShortcuts property.
ErrorClassAvalonia.Controls.PdfViewer.ErrorMessage is set.
ErrorMessagePropertyDefines the Avalonia.Controls.PdfViewer.ErrorMessage property.
FlowDirectionPropertyDefines the Avalonia.Visual.FlowDirection property. Inherited from Visual.
FocusablePropertyDefines the Avalonia.Input.InputElement.Focusable property. Inherited from InputElement.
FocusAdornerPropertyDefines the Avalonia.Controls.Control.FocusAdorner property. Inherited from Control.
FontFamilyPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontFamily property. Inherited from TemplatedControl.
FontFeaturesPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontFeaturesProperty property. Inherited from TemplatedControl.
FontSizePropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontSize property. Inherited from TemplatedControl.
FontStretchPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontWeight property. Inherited from TemplatedControl.
FontStylePropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontStyle property. Inherited from TemplatedControl.
FontWeightPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.FontWeight property. Inherited from TemplatedControl.
ForegroundPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.Foreground property. Inherited from TemplatedControl.
FormFieldFocusedClassKeyboard input is going to a form field.
GettingFocusEventDefines the Avalonia.Input.InputElement.GettingFocus event. Inherited from InputElement.
GotFocusEventDefines the Avalonia.Input.InputElement.GotFocus event. Inherited from InputElement.
HasBookmarksPropertyDefines the Avalonia.Controls.PdfViewer.HasBookmarks property.
HasDocumentClassA document is open.
HasDocumentPropertyDefines the Avalonia.Controls.PdfViewer.HasDocument property.
HasMirrorTransformPropertyDefines the Avalonia.Visual.HasMirrorTransform property. Inherited from Visual.
HasOutlinePropertyDefines the Avalonia.Controls.PdfViewer.HasOutline property.
HasSelectionPropertyDefines the Avalonia.Controls.PdfViewer.HasSelection property.
HeightPropertyDefines the Avalonia.Layout.Layoutable.Height property. Inherited from Layoutable.
HighlightColorPropertyDefines the Avalonia.Controls.PdfViewer.HighlightColor property.
HoldingEventDefines the Avalonia.Input.InputElement.Holding event. Inherited from InputElement.
HorizontalAlignmentPropertyDefines the Avalonia.Layout.Layoutable.HorizontalAlignment property. Inherited from Layoutable.
IncludeStampDatePropertyDefines the Avalonia.Controls.PdfViewer.IncludeStampDate property.
IsArrowKeyNudgeEnabledPropertyDefines the Avalonia.Controls.PdfViewer.IsArrowKeyNudgeEnabled property.
IsBookmarksEnabledPropertyDefines the Avalonia.Controls.PdfViewer.IsBookmarksEnabled property.
IsDirtyPropertyDefines the Avalonia.Controls.PdfViewer.IsDirty property.
IsDrawToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsDrawToolVisible property.
IsEffectivelyEnabledPropertyDefines the Avalonia.Input.InputElement.IsEffectivelyEnabled property. Inherited from InputElement.
IsEnabledPropertyDefines the Avalonia.Input.InputElement.IsEnabled property. Inherited from InputElement.
IsFocusedPropertyDefines the Avalonia.Input.InputElement.IsFocused property. Inherited from InputElement.
IsHighlightToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsHighlightToolVisible property.
IsHitTestVisiblePropertyDefines the Avalonia.Input.InputElement.IsHitTestVisible property. Inherited from InputElement.
IsHoldingEnabledPropertyDefines the IsHoldingEnabled attached property. Inherited from InputElement.
IsHoldWithMouseEnabledPropertyDefines the IsHoldWithMouseEnabled attached property. Inherited from InputElement.
IsKeyboardFocusWithinPropertyDefines the Avalonia.Input.InputElement.IsKeyboardFocusWithin property. Inherited from InputElement.
IsLinkToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsLinkToolVisible property.
IsLoadingPropertyDefines the Avalonia.Controls.PdfViewer.IsLoading property.
IsMobileLayoutPropertyDefines the Avalonia.Controls.PdfViewer.IsMobileLayout property. Managed automatically by the control: true on iOS/Android, and on any platform once the control is narrower than MobileLayoutWidthThreshold device-independent pixels.
IsMoreOptionsVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsMoreOptionsVisible property.
IsNoteToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsNoteToolVisible property.
IsOpenVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsOpenVisible property.
IsPointerOverPropertyDefines the Avalonia.Input.InputElement.IsPointerOver property. Inherited from InputElement.
IsPrintVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsPrintVisible property.
IsReadOnlyPropertyDefines the Avalonia.Controls.PdfViewer.IsReadOnly property.
IsRedactionUndoEnabledPropertyDefines the Avalonia.Controls.PdfViewer.IsRedactionUndoEnabled property.
IsRedactToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsRedactToolVisible property.
IsSaveAsVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsSaveAsVisible property.
IsSaveVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsSaveVisible property.
IsShapeToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsShapeToolVisible property.
IsShareVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsShareVisible property.
IsSidebarOpenPropertyDefines the Avalonia.Controls.PdfViewer.IsSidebarOpen property.
IsSidebarVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsSidebarVisible property.
IsSquigglyToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsSquigglyToolVisible property.
IsStampToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsStampToolVisible property.
IsStrikethroughToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsStrikethroughToolVisible property.
IsTableOfContentsEnabledPropertyDefines the Avalonia.Controls.PdfViewer.IsTableOfContentsEnabled property.
IsTabStopPropertyDefines the Avalonia.Input.InputElement.IsTabStop property. Inherited from InputElement.
IsTemplateFocusTargetPropertyDefines the IsTemplateFocusTarget attached property. Inherited from TemplatedControl.
IsTextToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsTextToolVisible property.
IsToolbarVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsToolbarVisible property.
IsUnderlineToolVisiblePropertyDefines the Avalonia.Controls.PdfViewer.IsUnderlineToolVisible property.
IsVisiblePropertyDefines the Avalonia.Visual.IsVisible property. Inherited from Visual.
KeyDownEventDefines the Avalonia.Input.InputElement.KeyDown event. Inherited from InputElement.
KeyUpEventDefines the Avalonia.Input.InputElement.KeyUp event. Inherited from InputElement.
LetterSpacingPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.LetterSpacing property. Inherited from TemplatedControl.
LoadedEventDefines the Avalonia.Controls.Control.Loaded event. Inherited from Control.
LoadingClassA document is being loaded.
LosingFocusEventDefines the Avalonia.Input.InputElement.LosingFocus event. Inherited from InputElement.
LostFocusEventDefines the Avalonia.Input.InputElement.LostFocus event. Inherited from InputElement.
MarginPropertyDefines the Avalonia.Layout.Layoutable.Margin property. Inherited from Layoutable.
MaxHeightPropertyDefines the Avalonia.Layout.Layoutable.MaxHeight property. Inherited from Layoutable.
MaxPageRenderBufferThe largest accepted value for Avalonia.Controls.PdfViewer.PageRenderBuffer.
MaxPageRetentionBufferThe largest accepted value for Avalonia.Controls.PdfViewer.PageRetentionBuffer.
MaxRedactionUndoStepsLimitLargest redaction undo history the control accepts. Each step holds a serialized copy of the document, so this is far lower than Avalonia.Controls.PdfViewer.MaxUndoStepsLimit.
MaxRedactionUndoStepsPropertyDefines the Avalonia.Controls.PdfViewer.MaxRedactionUndoSteps property.
MaxRenderScalePropertyDefines the Avalonia.Controls.PdfViewer.MaxRenderScale property.
MaxUndoStepsLimitLargest retained undo history the control accepts.
MaxUndoStepsPropertyDefines the Avalonia.Controls.PdfViewer.MaxUndoSteps property.
MaxWidthPropertyDefines the Avalonia.Layout.Layoutable.MaxWidth property. Inherited from Layoutable.
MaxZoomLimitLargest Avalonia.Controls.PdfViewer.MaxZoom the control accepts (10000%).
MaxZoomPropertyDefines the Avalonia.Controls.PdfViewer.MaxZoom property.
MinHeightPropertyDefines the Avalonia.Layout.Layoutable.MinHeight property. Inherited from Layoutable.
MinWidthPropertyDefines the Avalonia.Layout.Layoutable.MinWidth property. Inherited from Layoutable.
MinZoomPropertyDefines the Avalonia.Controls.PdfViewer.MinZoom property.
MobileClassThe compact mobile layout is in effect.
NamePropertyDefines the Avalonia.StyledElement.Name property. Inherited from StyledElement.
NarrowClassThe control is narrower than Avalonia.Controls.PdfViewer.NarrowToolbarWidth (a phone in portrait): the toolbar condenses.
NarrowToolbarWidthBelow this width the search field and the right cluster cannot share the toolbar, so the toolbar condenses: the search collapses to an icon and, opened, takes the whole row.
NoteColorPropertyDefines the Avalonia.Controls.PdfViewer.NoteColor property.
OpacityMaskPropertyDefines the Avalonia.Visual.OpacityMask property. Inherited from Visual.
OpacityPropertyDefines the Avalonia.Visual.Opacity property. Inherited from Visual.
PaddingPropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.Padding property. Inherited from TemplatedControl.
PageCountPropertyDefines the Avalonia.Controls.PdfViewer.PageCount property.
PageRenderBufferPropertyDefines the Avalonia.Controls.PdfViewer.PageRenderBuffer property. Values are clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRenderBuffer].
PageRetentionBufferPropertyDefines the Avalonia.Controls.PdfViewer.PageRetentionBuffer property. Values are clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRetentionBuffer].
ParentPropertyDefines the Avalonia.StyledElement.Parent property. Inherited from StyledElement.
PasswordPropertyDefines the Avalonia.Controls.PdfViewer.Password property.
PinchEndedEventDefines the Avalonia.Input.InputElement.PinchEnded event. Inherited from InputElement.
PinchEventDefines the Avalonia.Input.InputElement.Pinch event. Inherited from InputElement.
PointerCaptureLostEventDefines the Avalonia.Input.InputElement.PointerCaptureLost routed event. Inherited from InputElement.
PointerEnteredEventDefines the Avalonia.Input.InputElement.PointerEntered event. Inherited from InputElement.
PointerExitedEventDefines the Avalonia.Input.InputElement.PointerExited event. Inherited from InputElement.
PointerMovedEventDefines the Avalonia.Input.InputElement.PointerMoved event. Inherited from InputElement.
PointerPressedEventDefines the Avalonia.Input.InputElement.PointerPressed event. Inherited from InputElement.
PointerReleasedEventDefines the Avalonia.Input.InputElement.PointerReleased event. Inherited from InputElement.
PointerTouchPadGestureMagnifyEventDefines the Avalonia.Input.InputElement.PointerTouchPadGestureMagnify event. Inherited from InputElement.
PointerTouchPadGestureRotateEventDefines the Avalonia.Input.InputElement.PointerTouchPadGestureRotate event. Inherited from InputElement.
PointerTouchPadGestureSwipeEventDefines the Avalonia.Input.InputElement.PointerTouchPadGestureSwipe event. Inherited from InputElement.
PointerWheelChangedEventDefines the Avalonia.Input.InputElement.PointerWheelChanged event. Inherited from InputElement.
PrintServicePropertyDefines the Avalonia.Controls.PdfViewer.PrintService property.
PullGestureEndedEventDefines the Avalonia.Input.InputElement.PullGestureEnded event. Inherited from InputElement.
PullGestureEventDefines the Avalonia.Input.InputElement.PullGesture event. Inherited from InputElement.
ReadOnlyClassAvalonia.Controls.PdfViewer.IsReadOnly is true.
RedactionRemovesHiddenInformationPropertyDefines the Avalonia.Controls.PdfViewer.RedactionRemovesHiddenInformation property.
RenderTransformOriginPropertyDefines the Avalonia.Visual.RenderTransformOrigin property. Inherited from Visual.
RenderTransformPropertyDefines the Avalonia.Visual.RenderTransform property. Inherited from Visual.
RequestBringIntoViewEventEvent raised when an element wishes to be scrolled into view. Inherited from Control.
RespectDocumentPermissionsPropertyDefines the Avalonia.Controls.PdfViewer.RespectDocumentPermissions property.
RightTappedEventDefines the Avalonia.Input.InputElement.RightTapped event. Inherited from InputElement.
ScrollGestureEndedEventDefines the Avalonia.Input.InputElement.ScrollGestureEnded event. Inherited from InputElement.
ScrollGestureEventDefines the Avalonia.Input.InputElement.ScrollGesture event. Inherited from InputElement.
ScrollGestureInertiaStartingEventDefines the Avalonia.Input.InputElement.ScrollGestureInertiaStarting event. Inherited from InputElement.
SearchMatchCasePropertyDefines the Avalonia.Controls.PdfViewer.SearchMatchCase property.
SearchMatchWholeWordPropertyDefines the Avalonia.Controls.PdfViewer.SearchMatchWholeWord property.
SearchOpenClassThe condensed search field is open (only meaningful with Avalonia.Controls.PdfViewer.NarrowClass).
SearchQueryPropertyDefines the Avalonia.Controls.PdfViewer.SearchQuery property.
SearchResultCountPropertyDefines the Avalonia.Controls.PdfViewer.SearchResultCount property.
SearchResultsPropertyDefines the Avalonia.Controls.PdfViewer.SearchResults property.
SelectedShapeTypePropertyDefines the Avalonia.Controls.PdfViewer.SelectedShapeType property.
SelectedTextPropertyDefines the Avalonia.Controls.PdfViewer.SelectedText property.
ShapeFillColorPropertyDefines the Avalonia.Controls.PdfViewer.ShapeFillColor property. Null means no fill.
ShapeSelectedClassA shape annotation is selected for editing.
ShapeStrokeColorPropertyDefines the Avalonia.Controls.PdfViewer.ShapeStrokeColor property. Null means no stroke.
ShapeStrokeWidthPropertyDefines the Avalonia.Controls.PdfViewer.ShapeStrokeWidth property.
ShapeSubtypeModePropertyDefines the Avalonia.Controls.PdfViewer.ShapeSubtypeMode property.
ShareServicePropertyDefines the Avalonia.Controls.PdfViewer.ShareService property.
ShowBookmarkIndicatorsPropertyDefines the Avalonia.Controls.PdfViewer.ShowBookmarkIndicators property.
SidebarModePropertyDefines the Avalonia.Controls.PdfViewer.SidebarMode property.
SidebarOpenClassA sidebar pane is open (Avalonia.Controls.PdfViewer.SidebarMode is not None).
SidebarPlacementPropertyDefines the Avalonia.Controls.PdfViewer.SidebarPlacement property.
SidebarSelectionBrushPropertyDefines the Avalonia.Controls.PdfViewer.SidebarSelectionBrush property.
SidebarWidthPropertyDefines the Avalonia.Controls.PdfViewer.SidebarWidth property.
SizeChangedEventDefines the Avalonia.Controls.Control.SizeChanged event. Inherited from Control.
SourcePropertyDefines the Avalonia.Controls.PdfViewer.Source property.
SquigglyColorPropertyDefines the Avalonia.Controls.PdfViewer.SquigglyColor property.
StampColorPropertyDefines the Avalonia.Controls.PdfViewer.StampColor property.
StampDateFormatPropertyDefines the Avalonia.Controls.PdfViewer.StampDateFormat property.
StampLabelsPropertyDefines the Avalonia.Controls.PdfViewer.StampLabels property.
StampStylePropertyDefines the Avalonia.Controls.PdfViewer.StampStyle property.
StrikeoutColorPropertyDefines the Avalonia.Controls.PdfViewer.StrikeoutColor property.
StringsPropertyDefines the Avalonia.Controls.PdfViewer.Strings property.
SwipeGestureEndedEventDefines the Avalonia.Input.InputElement.SwipeGestureEnded event. Inherited from InputElement.
SwipeGestureEventDefines the Avalonia.Input.InputElement.SwipeGesture event. Inherited from InputElement.
TabIndexPropertyDefines the Avalonia.Input.InputElement.TabIndex property. Inherited from InputElement.
TagPropertyDefines the Avalonia.Controls.Control.Tag property. Inherited from Control.
TappedEventDefines the Avalonia.Input.InputElement.Tapped event. Inherited from InputElement.
TemplateAppliedEventDefines the Avalonia.Controls.Primitives.TemplatedControl.TemplateApplied routed event. Inherited from TemplatedControl.
TemplatedParentPropertyDefines the Avalonia.StyledElement.TemplatedParent property. Inherited from StyledElement.
TemplatePropertyDefines the Avalonia.Controls.Primitives.TemplatedControl.Template property. Inherited from TemplatedControl.
TextAnnotationFillColorPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationFillColor property. Null means no fill (default).
TextAnnotationFontAttributesPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationFontAttributes property.
TextAnnotationFontPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationFont property.
TextAnnotationFontSizePropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationFontSize property.
TextAnnotationStrokeColorPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationStrokeColor property. Null means no stroke (default).
TextAnnotationStrokeWidthPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationStrokeWidth property.
TextAnnotationTextAlignPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationTextAlign property.
TextAnnotationTextColorPropertyDefines the Avalonia.Controls.PdfViewer.TextAnnotationTextColor property.
TextInputEventDefines the Avalonia.Input.InputElement.TextInput event. Inherited from InputElement.
TextInputMethodClientRequestedEventDefines the Avalonia.Input.InputElement.TextInputMethodClientRequested event. Inherited from InputElement.
TextSelectedClassPage text is selected.
ThemePropertyDefines the Avalonia.StyledElement.Theme property. Inherited from StyledElement.
ToolbarLayoutModePropertyDefines the Avalonia.Controls.PdfViewer.ToolbarLayoutMode property — the public knob for forcing the touch or desktop toolbar. Avalonia.Controls.PdfToolbarLayoutMode.Auto by default.
TransitionsPropertyDefines the Avalonia.Animation.Animatable.Transitions property. Inherited from Animatable.
UnderlineColorPropertyDefines the Avalonia.Controls.PdfViewer.UnderlineColor property.
UnloadedEventDefines the Avalonia.Controls.Control.Unloaded event. Inherited from Control.
UseLayoutRoundingPropertyDefines the Avalonia.Layout.Layoutable.UseLayoutRounding property. Inherited from Layoutable.
VerticalAlignmentPropertyDefines the Avalonia.Layout.Layoutable.VerticalAlignment property. Inherited from Layoutable.
ViewModePropertyDefines the Avalonia.Controls.PdfViewer.ViewMode property.
VisualParentPropertyDefines the Avalonia.Visual.VisualParent property. Inherited from Visual.
WidthPropertyDefines the Avalonia.Layout.Layoutable.Width property. Inherited from Layoutable.
ZIndexPropertyDefines the Avalonia.Visual.ZIndex property. Inherited from Visual.
ZoomLevelPropertyDefines the Avalonia.Controls.PdfViewer.ZoomLevel property.
ZoomModePropertyDefines the Avalonia.Controls.PdfViewer.ZoomMode property.
ZoomStepPropertyDefines the Avalonia.Controls.PdfViewer.ZoomStep property.

ActiveToolProperty Field​

Defines the Avalonia.Controls.PdfViewer.ActiveTool property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfViewerTool> ActiveToolProperty

AllowAnnotationEditingProperty Field​

Defines the Avalonia.Controls.PdfViewer.AllowAnnotationEditing property.

public Avalonia.StyledProperty<bool> AllowAnnotationEditingProperty

AllowDocumentSavingProperty Field​

Defines the Avalonia.Controls.PdfViewer.AllowDocumentSaving property.

public Avalonia.StyledProperty<bool> AllowDocumentSavingProperty

AllowFormEditingProperty Field​

Defines the Avalonia.Controls.PdfViewer.AllowFormEditing property.

public Avalonia.StyledProperty<bool> AllowFormEditingProperty

AllowTextSelectionProperty Field​

Defines the Avalonia.Controls.PdfViewer.AllowTextSelection property.

public Avalonia.StyledProperty<bool> AllowTextSelectionProperty

AnnotatingClass Field​

An annotation tool is active (Avalonia.Controls.PdfViewer.AnnotationMode is not None).

public string AnnotatingClass

AnnotationModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.AnnotationMode property.

public Avalonia.StyledProperty<Avalonia.Controls.AnnotationMode> AnnotationModeProperty

AutoSaveProperty Field​

Defines the Avalonia.Controls.PdfViewer.AutoSave property.

public Avalonia.StyledProperty<bool> AutoSaveProperty

CanEditAnnotationsProperty Field​

Defines the Avalonia.Controls.PdfViewer.CanEditAnnotations property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> CanEditAnnotationsProperty

CanRedoProperty Field​

Defines the Avalonia.Controls.PdfViewer.CanRedo property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> CanRedoProperty

CanUndoProperty Field​

Defines the Avalonia.Controls.PdfViewer.CanUndo property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> CanUndoProperty

CurrentPageProperty Field​

Defines the Avalonia.Controls.PdfViewer.CurrentPage property.

public Avalonia.StyledProperty<int> CurrentPageProperty

CurrentSearchResultIndexProperty Field​

Defines the Avalonia.Controls.PdfViewer.CurrentSearchResultIndex property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, int> CurrentSearchResultIndexProperty

DefaultStampDateFormat Field​

The date format used by default for a stamp's date line ("12 SEP 2026").

public string DefaultStampDateFormat

DefaultStampLabels Field​

The stamp labels offered by default: the ISO 32000 standard names plus common extras.

public System.Collections.Generic.IReadOnlyList<string> DefaultStampLabels

DocumentSourceProperty Field​

Defines the Avalonia.Controls.PdfViewer.DocumentSource property.

public Avalonia.StyledProperty<object> DocumentSourceProperty

DrawStrokeColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.DrawStrokeColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> DrawStrokeColorProperty

DrawStrokeWidthProperty Field​

Defines the Avalonia.Controls.PdfViewer.DrawStrokeWidth property.

public Avalonia.StyledProperty<float> DrawStrokeWidthProperty

EditingTextClass Field​

A free-text annotation is being edited in place.

public string EditingTextClass

EnableKeyboardShortcutsProperty Field​

Defines the Avalonia.Controls.PdfViewer.EnableKeyboardShortcuts property.

public Avalonia.StyledProperty<bool> EnableKeyboardShortcutsProperty

ErrorClass Field​

Avalonia.Controls.PdfViewer.ErrorMessage is set.

public string ErrorClass

ErrorMessageProperty Field​

Defines the Avalonia.Controls.PdfViewer.ErrorMessage property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, string> ErrorMessageProperty

FormFieldFocusedClass Field​

Keyboard input is going to a form field.

public string FormFieldFocusedClass

HasBookmarksProperty Field​

Defines the Avalonia.Controls.PdfViewer.HasBookmarks property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> HasBookmarksProperty

HasDocumentClass Field​

A document is open.

public string HasDocumentClass

HasDocumentProperty Field​

Defines the Avalonia.Controls.PdfViewer.HasDocument property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> HasDocumentProperty

HasOutlineProperty Field​

Defines the Avalonia.Controls.PdfViewer.HasOutline property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> HasOutlineProperty

HasSelectionProperty Field​

Defines the Avalonia.Controls.PdfViewer.HasSelection property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> HasSelectionProperty

HighlightColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.HighlightColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> HighlightColorProperty

IncludeStampDateProperty Field​

Defines the Avalonia.Controls.PdfViewer.IncludeStampDate property.

public Avalonia.StyledProperty<bool> IncludeStampDateProperty

IsArrowKeyNudgeEnabledProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsArrowKeyNudgeEnabled property.

public Avalonia.StyledProperty<bool> IsArrowKeyNudgeEnabledProperty

IsBookmarksEnabledProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsBookmarksEnabled property.

public Avalonia.StyledProperty<bool> IsBookmarksEnabledProperty

IsDirtyProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsDirty property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> IsDirtyProperty

IsDrawToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsDrawToolVisible property.

public Avalonia.StyledProperty<bool> IsDrawToolVisibleProperty

IsHighlightToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsHighlightToolVisible property.

public Avalonia.StyledProperty<bool> IsHighlightToolVisibleProperty

IsLinkToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsLinkToolVisible property.

public Avalonia.StyledProperty<bool> IsLinkToolVisibleProperty

IsLoadingProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsLoading property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> IsLoadingProperty

IsMobileLayoutProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsMobileLayout property. Managed automatically by the control: true on iOS/Android, and on any platform once the control is narrower than MobileLayoutWidthThreshold device-independent pixels.

public Avalonia.StyledProperty<bool> IsMobileLayoutProperty

IsMoreOptionsVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsMoreOptionsVisible property.

public Avalonia.StyledProperty<bool> IsMoreOptionsVisibleProperty

IsNoteToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsNoteToolVisible property.

public Avalonia.StyledProperty<bool> IsNoteToolVisibleProperty

IsOpenVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsOpenVisible property.

public Avalonia.StyledProperty<bool> IsOpenVisibleProperty

IsPrintVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsPrintVisible property.

public Avalonia.StyledProperty<bool> IsPrintVisibleProperty

IsReadOnlyProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsReadOnly property.

public Avalonia.StyledProperty<bool> IsReadOnlyProperty

IsRedactionUndoEnabledProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsRedactionUndoEnabled property.

public Avalonia.StyledProperty<bool> IsRedactionUndoEnabledProperty

IsRedactToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsRedactToolVisible property.

public Avalonia.StyledProperty<bool> IsRedactToolVisibleProperty

IsSaveAsVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsSaveAsVisible property.

public Avalonia.StyledProperty<bool> IsSaveAsVisibleProperty

IsSaveVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsSaveVisible property.

public Avalonia.StyledProperty<bool> IsSaveVisibleProperty

IsShapeToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsShapeToolVisible property.

public Avalonia.StyledProperty<bool> IsShapeToolVisibleProperty

IsShareVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsShareVisible property.

public Avalonia.StyledProperty<bool> IsShareVisibleProperty

IsSidebarOpenProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsSidebarOpen property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, bool> IsSidebarOpenProperty

IsSidebarVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsSidebarVisible property.

public Avalonia.StyledProperty<bool> IsSidebarVisibleProperty

IsSquigglyToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsSquigglyToolVisible property.

public Avalonia.StyledProperty<bool> IsSquigglyToolVisibleProperty

IsStampToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsStampToolVisible property.

public Avalonia.StyledProperty<bool> IsStampToolVisibleProperty

IsStrikethroughToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsStrikethroughToolVisible property.

public Avalonia.StyledProperty<bool> IsStrikethroughToolVisibleProperty

IsTableOfContentsEnabledProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsTableOfContentsEnabled property.

public Avalonia.StyledProperty<bool> IsTableOfContentsEnabledProperty

IsTextToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsTextToolVisible property.

public Avalonia.StyledProperty<bool> IsTextToolVisibleProperty

IsToolbarVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsToolbarVisible property.

public Avalonia.StyledProperty<bool> IsToolbarVisibleProperty

IsUnderlineToolVisibleProperty Field​

Defines the Avalonia.Controls.PdfViewer.IsUnderlineToolVisible property.

public Avalonia.StyledProperty<bool> IsUnderlineToolVisibleProperty

LoadingClass Field​

A document is being loaded.

public string LoadingClass

MaxPageRenderBuffer Field​

The largest accepted value for Avalonia.Controls.PdfViewer.PageRenderBuffer.

public int MaxPageRenderBuffer

MaxPageRetentionBuffer Field​

The largest accepted value for Avalonia.Controls.PdfViewer.PageRetentionBuffer.

public int MaxPageRetentionBuffer

MaxRedactionUndoStepsLimit Field​

Largest redaction undo history the control accepts. Each step holds a serialized copy of the document, so this is far lower than Avalonia.Controls.PdfViewer.MaxUndoStepsLimit.

public int MaxRedactionUndoStepsLimit

MaxRedactionUndoStepsProperty Field​

Defines the Avalonia.Controls.PdfViewer.MaxRedactionUndoSteps property.

public Avalonia.StyledProperty<int> MaxRedactionUndoStepsProperty

MaxRenderScaleProperty Field​

Defines the Avalonia.Controls.PdfViewer.MaxRenderScale property.

public Avalonia.StyledProperty<double> MaxRenderScaleProperty

MaxUndoStepsLimit Field​

Largest retained undo history the control accepts.

public int MaxUndoStepsLimit

MaxUndoStepsProperty Field​

Defines the Avalonia.Controls.PdfViewer.MaxUndoSteps property.

public Avalonia.StyledProperty<int> MaxUndoStepsProperty

MaxZoomLimit Field​

Largest Avalonia.Controls.PdfViewer.MaxZoom the control accepts (10000%).

public double MaxZoomLimit

MaxZoomProperty Field​

Defines the Avalonia.Controls.PdfViewer.MaxZoom property.

public Avalonia.StyledProperty<double> MaxZoomProperty

MinZoomProperty Field​

Defines the Avalonia.Controls.PdfViewer.MinZoom property.

public Avalonia.StyledProperty<double> MinZoomProperty

MobileClass Field​

The compact mobile layout is in effect.

public string MobileClass

NarrowClass Field​

The control is narrower than Avalonia.Controls.PdfViewer.NarrowToolbarWidth (a phone in portrait): the toolbar condenses.

public string NarrowClass

NarrowToolbarWidth Field​

Below this width the search field and the right cluster cannot share the toolbar, so the toolbar condenses: the search collapses to an icon and, opened, takes the whole row.

public double NarrowToolbarWidth

NoteColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.NoteColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> NoteColorProperty

Remarks​

Default matches the first sticky-note swatch (warm yellow).

PageCountProperty Field​

Defines the Avalonia.Controls.PdfViewer.PageCount property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, int> PageCountProperty

PageRenderBufferProperty Field​

Defines the Avalonia.Controls.PdfViewer.PageRenderBuffer property. Values are clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRenderBuffer].

public Avalonia.StyledProperty<int> PageRenderBufferProperty

PageRetentionBufferProperty Field​

Defines the Avalonia.Controls.PdfViewer.PageRetentionBuffer property. Values are clamped to [0, Avalonia.Controls.PdfViewer.MaxPageRetentionBuffer].

public Avalonia.StyledProperty<int> PageRetentionBufferProperty

PasswordProperty Field​

Defines the Avalonia.Controls.PdfViewer.Password property.

public Avalonia.StyledProperty<string> PasswordProperty

PrintServiceProperty Field​

Defines the Avalonia.Controls.PdfViewer.PrintService property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Services.IPrintService> PrintServiceProperty

ReadOnlyClass Field​

Avalonia.Controls.PdfViewer.IsReadOnly is true.

public string ReadOnlyClass

RedactionRemovesHiddenInformationProperty Field​

Defines the Avalonia.Controls.PdfViewer.RedactionRemovesHiddenInformation property.

public Avalonia.StyledProperty<bool> RedactionRemovesHiddenInformationProperty

RespectDocumentPermissionsProperty Field​

Defines the Avalonia.Controls.PdfViewer.RespectDocumentPermissions property.

public Avalonia.StyledProperty<bool> RespectDocumentPermissionsProperty

SearchMatchCaseProperty Field​

Defines the Avalonia.Controls.PdfViewer.SearchMatchCase property.

public Avalonia.StyledProperty<bool> SearchMatchCaseProperty

SearchMatchWholeWordProperty Field​

Defines the Avalonia.Controls.PdfViewer.SearchMatchWholeWord property.

public Avalonia.StyledProperty<bool> SearchMatchWholeWordProperty

SearchOpenClass Field​

The condensed search field is open (only meaningful with Avalonia.Controls.PdfViewer.NarrowClass).

public string SearchOpenClass

SearchQueryProperty Field​

Defines the Avalonia.Controls.PdfViewer.SearchQuery property.

public Avalonia.StyledProperty<string> SearchQueryProperty

SearchResultCountProperty Field​

Defines the Avalonia.Controls.PdfViewer.SearchResultCount property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, int> SearchResultCountProperty

SearchResultsProperty Field​

Defines the Avalonia.Controls.PdfViewer.SearchResults property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Pdf.Core.PdfSearchResult>> SearchResultsProperty

SelectedShapeTypeProperty Field​

Defines the Avalonia.Controls.PdfViewer.SelectedShapeType property.

public Avalonia.StyledProperty<Avalonia.Controls.ShapeType> SelectedShapeTypeProperty

SelectedTextProperty Field​

Defines the Avalonia.Controls.PdfViewer.SelectedText property.

public Avalonia.DirectProperty<Avalonia.Controls.PdfViewer, string> SelectedTextProperty

ShapeFillColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShapeFillColor property. Null means no fill.

public Avalonia.StyledProperty<Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>> ShapeFillColorProperty

ShapeSelectedClass Field​

A shape annotation is selected for editing.

public string ShapeSelectedClass

ShapeStrokeColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShapeStrokeColor property. Null means no stroke.

public Avalonia.StyledProperty<Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>> ShapeStrokeColorProperty

ShapeStrokeWidthProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShapeStrokeWidth property.

public Avalonia.StyledProperty<float> ShapeStrokeWidthProperty

ShapeSubtypeModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShapeSubtypeMode property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfShapeSubtypeMode> ShapeSubtypeModeProperty

ShareServiceProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShareService property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Services.IShareService> ShareServiceProperty

ShowBookmarkIndicatorsProperty Field​

Defines the Avalonia.Controls.PdfViewer.ShowBookmarkIndicators property.

public Avalonia.StyledProperty<bool> ShowBookmarkIndicatorsProperty

SidebarModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.SidebarMode property.

public Avalonia.StyledProperty<Avalonia.Controls.SidebarMode> SidebarModeProperty

SidebarOpenClass Field​

A sidebar pane is open (Avalonia.Controls.PdfViewer.SidebarMode is not None).

public string SidebarOpenClass

SidebarPlacementProperty Field​

Defines the Avalonia.Controls.PdfViewer.SidebarPlacement property.

public Avalonia.StyledProperty<Avalonia.Controls.SidebarPlacement> SidebarPlacementProperty

SidebarSelectionBrushProperty Field​

Defines the Avalonia.Controls.PdfViewer.SidebarSelectionBrush property.

public Avalonia.StyledProperty<Avalonia.Media.IBrush> SidebarSelectionBrushProperty

SidebarWidthProperty Field​

Defines the Avalonia.Controls.PdfViewer.SidebarWidth property.

public Avalonia.StyledProperty<double> SidebarWidthProperty

SourceProperty Field​

Defines the Avalonia.Controls.PdfViewer.Source property.

public Avalonia.StyledProperty<string> SourceProperty

SquigglyColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.SquigglyColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> SquigglyColorProperty

StampColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.StampColor property.

public Avalonia.StyledProperty<Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>> StampColorProperty

StampDateFormatProperty Field​

Defines the Avalonia.Controls.PdfViewer.StampDateFormat property.

public Avalonia.StyledProperty<string> StampDateFormatProperty

StampLabelsProperty Field​

Defines the Avalonia.Controls.PdfViewer.StampLabels property.

public Avalonia.StyledProperty<System.Collections.Generic.IReadOnlyList<string>> StampLabelsProperty

StampStyleProperty Field​

Defines the Avalonia.Controls.PdfViewer.StampStyle property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfStampStyle> StampStyleProperty

StrikeoutColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.StrikeoutColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> StrikeoutColorProperty

StringsProperty Field​

Defines the Avalonia.Controls.PdfViewer.Strings property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfViewerStrings> StringsProperty

TextAnnotationFillColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationFillColor property. Null means no fill (default).

public Avalonia.StyledProperty<Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>> TextAnnotationFillColorProperty

TextAnnotationFontAttributesProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationFontAttributes property.

public Avalonia.StyledProperty<Avalonia.Controls.FontAttributes> TextAnnotationFontAttributesProperty

TextAnnotationFontProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationFont property.

public Avalonia.StyledProperty<string> TextAnnotationFontProperty

TextAnnotationFontSizeProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationFontSize property.

public Avalonia.StyledProperty<float> TextAnnotationFontSizeProperty

TextAnnotationStrokeColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationStrokeColor property. Null means no stroke (default).

public Avalonia.StyledProperty<Nullable<Avalonia.Controls.Pdf.Core.PdfAnnotationColor>> TextAnnotationStrokeColorProperty

TextAnnotationStrokeWidthProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationStrokeWidth property.

public Avalonia.StyledProperty<float> TextAnnotationStrokeWidthProperty

TextAnnotationTextAlignProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationTextAlign property.

public Avalonia.StyledProperty<Avalonia.Controls.TextAnnotationAlignment> TextAnnotationTextAlignProperty

TextAnnotationTextColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.TextAnnotationTextColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> TextAnnotationTextColorProperty

TextSelectedClass Field​

Page text is selected.

public string TextSelectedClass

ToolbarLayoutModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.ToolbarLayoutMode property — the public knob for forcing the touch or desktop toolbar. Avalonia.Controls.PdfToolbarLayoutMode.Auto by default.

public Avalonia.StyledProperty<Avalonia.Controls.PdfToolbarLayoutMode> ToolbarLayoutModeProperty

UnderlineColorProperty Field​

Defines the Avalonia.Controls.PdfViewer.UnderlineColor property.

public Avalonia.StyledProperty<Avalonia.Controls.Pdf.Core.PdfAnnotationColor> UnderlineColorProperty

ViewModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.ViewMode property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfViewMode> ViewModeProperty

ZoomLevelProperty Field​

Defines the Avalonia.Controls.PdfViewer.ZoomLevel property.

public Avalonia.StyledProperty<double> ZoomLevelProperty

ZoomModeProperty Field​

Defines the Avalonia.Controls.PdfViewer.ZoomMode property.

public Avalonia.StyledProperty<Avalonia.Controls.PdfZoomMode> ZoomModeProperty

ZoomStepProperty Field​

Defines the Avalonia.Controls.PdfViewer.ZoomStep property.

public Avalonia.StyledProperty<double> ZoomStepProperty

Events​

NameDescription
ActualThemeVariantChangedRaised when the theme variant is changed on the element or an ancestor of the element. Inherited from StyledElement.
AnnotationAddedRaised when an annotation is added to the document.
AnnotationErrorRaised when an annotation operation fails — adding, editing or deleting an annotation.
AttachedToLogicalTreeRaised when the styled element is attached to a rooted logical tree. Inherited from StyledElement.
AttachedToVisualTreeRaised when the control is attached to a rooted visual tree. Inherited from Visual.
BookmarksChangedRaised whenever the user bookmark set changes (added, removed, or reloaded on document load).
ContextCanceledOccurs when the context input gesture continues into another gesture, to notify the element that the context flyout should not be opened. Inherited from InputElement.
ContextRequestedOccurs when the user has completed a context input gesture, such as a right-click. Inherited from InputElement.
DataContextChangedOccurs when the Avalonia.StyledElement.DataContext property changes. Inherited from StyledElement.
DetachedFromLogicalTreeRaised when the styled element is detached from a rooted logical tree. Inherited from StyledElement.
DetachedFromVisualTreeRaised when the control is detached from a rooted visual tree. Inherited from Visual.
DocumentClosedRaised when the current document is closed.
DocumentLoadedRaised when a document is loaded.
DoubleTappedOccurs when the user briefly contacts and releases twice on a single point, without significant movement. Inherited from InputElement.
EffectiveViewportChangedOccurs when the element's effective viewport changes. Inherited from Layoutable.
GettingFocusOccurs before the control receives focus. Inherited from InputElement.
GotFocusOccurs when the control receives focus. Inherited from InputElement.
HoldingOccurs when the user makes a single contact, then maintains contact beyond a given time threshold without releasing or making another contact. Inherited from InputElement.
InitializedOccurs when the styled element has finished initialization. Inherited from StyledElement.
KeyDownOccurs when a key is pressed while the control has focus. Inherited from InputElement.
KeyUpOccurs when a key is released while the control has focus. Inherited from InputElement.
LayoutUpdatedOccurs when a layout pass completes for the control. Inherited from Layoutable.
LinkClickedRaised when a link is clicked.
LoadedOccurs when the control has been fully constructed in the visual tree and both layout and render are complete. Inherited from Control.
LoadErrorRaised when loading fails.
LosingFocusOccurs before the control loses focus. Inherited from InputElement.
LostFocusOccurs when the control loses focus. Inherited from InputElement.
OpenRequestedRaised when opening a document is requested (menu, Avalonia.Controls.PdfViewer.Open, Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.OpenCommand) before the built-in file picker is shown. Set Avalonia.Controls.PdfOpenRequestedEventArgs.Handled to open the document in the application.
PageChangedRaised when Avalonia.Controls.PdfViewer.CurrentPage changes.
PageRenderedRaised after a page's bitmap has been rendered to the view.
PinchOccurs when the user moves two contact points closer together. Inherited from InputElement.
PinchEndedOccurs when the user releases both contact points used in a pinch gesture. Inherited from InputElement.
PointerCaptureLostOccurs when the control or its child control loses the pointer capture for any reason, event will not be triggered for a parent control if capture was transferred to another child of that parent control. Inherited from InputElement.
PointerEnteredOccurs when the pointer enters the control. Inherited from InputElement.
PointerExitedOccurs when the pointer leaves the control. Inherited from InputElement.
PointerMovedOccurs when the pointer moves over the control. Inherited from InputElement.
PointerPressedOccurs when the pointer is pressed over the control. Inherited from InputElement.
PointerReleasedOccurs when the pointer is released over the control. Inherited from InputElement.
PointerTouchPadGestureMagnifyOccurs when the user moves two contact points away from each other on a touchpad. Inherited from InputElement.
PointerTouchPadGestureRotateOccurs when the user places two contact points and moves them in a circular motion on a touchpad. Inherited from InputElement.
PointerTouchPadGestureSwipeOccurs when the user performs a rapid dragging motion in a single direction on a touchpad. Inherited from InputElement.
PointerWheelChangedOccurs when the mouse is scrolled over the control. Inherited from InputElement.
PrintRequestedRaised when printing is requested (menu, Avalonia.Controls.PdfViewer.Print, Avalonia.Controls.PdfViewer.PrintAsync(Avalonia.Controls.Pdf.Services.PrintOptions,System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.PrintCommand) before the built-in print service runs. Set Avalonia.Controls.PdfPrintRequestedEventArgs.Handled to print in the application instead.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.
PullGestureOccurs when the user drags from the edge of a control. Inherited from InputElement.
PullGestureEndedOccurs when the user releases the pointer after a pull gesture. Inherited from InputElement.
ResourcesChangedOccurs when a resource in this styled element or a parent styled element has changed. Inherited from StyledElement.
RightTappedOccurs when the user briefly contacts and releases a single point, without significant movement, using a mechanism on the input device recognized as a right button or equivalent. Inherited from InputElement.
SaveAsRequestedRaised when Save As is requested (menu, Avalonia.Controls.PdfViewer.SaveAs, Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.SaveAsCommand) before the built-in save picker is shown. Set Avalonia.Controls.PdfSaveAsRequestedEventArgs.Handled to write the document in the application.
ScrollGestureOccurs when the user continuously moves the pointer in the same direction within the control’s boundaries. Inherited from InputElement.
ScrollGestureEndedOccurs when a scroll gesture has fully stopped, taking into account any inertial movement that continues the scroll after the user has released the pointer. Inherited from InputElement.
ScrollGestureInertiaStartingOccurs within a scroll gesture, when the user releases the pointer, and scrolling continues by transitioning to momentum-based gliding movement. Inherited from InputElement.
SearchCompletedRaised when a search completes (including programmatic Avalonia.Controls.PdfViewer.SearchAsync(string,Avalonia.Controls.Pdf.Core.SearchOptions)).
ShareRequestedRaised when sharing is requested (menu, Avalonia.Controls.PdfViewer.Share, Avalonia.Controls.PdfViewer.ShareAsync(Avalonia.Controls.Pdf.Services.ShareOptions,System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.ShareCommand) before the built-in share service runs. Set Avalonia.Controls.PdfShareRequestedEventArgs.Handled to share in the application instead.
SizeChangedOccurs when the bounds (actual size) of the control have changed. Inherited from Control.
SwipeGestureOccurs when the user rapidly drags the pointer in a single direction across the control. Inherited from InputElement.
SwipeGestureEndedOccurs when a swipe gesture ends on the control. Inherited from InputElement.
TappedOccurs when the user briefly contacts and releases a single point, without significant movement. Inherited from InputElement.
TemplateAppliedRaised when the control's template is applied. Inherited from TemplatedControl.
TextInputOccurs when a user typed some text while the control has focus. Inherited from InputElement.
TextInputMethodClientRequestedOccurs when an input element gains input focus and input method is looking for the corresponding client Inherited from InputElement.
UndoRedoStateChangedRaised whenever Avalonia.Controls.PdfViewer.CanUndo or Avalonia.Controls.PdfViewer.CanRedo changes.
UnloadedOccurs when the control is removed from the visual tree. Inherited from Control.
ZoomChangedRaised when Avalonia.Controls.PdfViewer.ZoomLevel changes.

AnnotationAdded Event​

Raised when an annotation is added to the document.

public event EventHandler<Avalonia.Controls.Pdf.Core.PdfAnnotationEventArgs> AnnotationAdded

AnnotationError Event​

Raised when an annotation operation fails — adding, editing or deleting an annotation.

public event EventHandler<Avalonia.Controls.PdfAnnotationErrorEventArgs> AnnotationError

Remarks​

The user has already acted by the time this fires (drawn a shape, pressed Delete), so a failure is silent from their point of view unless the host surfaces it. The message is also written to Avalonia.Controls.PdfViewer.ErrorMessage, so binding that is enough for simple hosts; handle this event when you need the Avalonia.Controls.PdfAnnotationErrorEventArgs.Operation or the underlying exception.

BookmarksChanged Event​

Raised whenever the user bookmark set changes (added, removed, or reloaded on document load).

public event EventHandler BookmarksChanged

DocumentClosed Event​

Raised when the current document is closed.

public event EventHandler DocumentClosed

DocumentLoaded Event​

Raised when a document is loaded.

public event EventHandler<Avalonia.Controls.PdfDocumentLoadedEventArgs> DocumentLoaded

LinkClicked Event​

Raised when a link is clicked.

public event EventHandler<Avalonia.Controls.PdfLinkClickedEventArgs> LinkClicked

LoadError Event​

Raised when loading fails.

public event EventHandler<Avalonia.Controls.PdfLoadErrorEventArgs> LoadError

OpenRequested Event​

Raised when opening a document is requested (menu, Avalonia.Controls.PdfViewer.Open, Avalonia.Controls.PdfViewer.OpenAsync(System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.OpenCommand) before the built-in file picker is shown. Set Avalonia.Controls.PdfOpenRequestedEventArgs.Handled to open the document in the application.

public event EventHandler<Avalonia.Controls.PdfOpenRequestedEventArgs> OpenRequested

PageChanged Event​

Raised when Avalonia.Controls.PdfViewer.CurrentPage changes.

public event EventHandler<Avalonia.Controls.PdfPageChangedEventArgs> PageChanged

PageRendered Event​

Raised after a page's bitmap has been rendered to the view.

public event EventHandler<Avalonia.Controls.PdfPageRenderedEventArgs> PageRendered

PrintRequested Event​

Raised when printing is requested (menu, Avalonia.Controls.PdfViewer.Print, Avalonia.Controls.PdfViewer.PrintAsync(Avalonia.Controls.Pdf.Services.PrintOptions,System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.PrintCommand) before the built-in print service runs. Set Avalonia.Controls.PdfPrintRequestedEventArgs.Handled to print in the application instead.

public event EventHandler<Avalonia.Controls.PdfPrintRequestedEventArgs> PrintRequested

SaveAsRequested Event​

Raised when Save As is requested (menu, Avalonia.Controls.PdfViewer.SaveAs, Avalonia.Controls.PdfViewer.SaveAsAsync(System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.SaveAsCommand) before the built-in save picker is shown. Set Avalonia.Controls.PdfSaveAsRequestedEventArgs.Handled to write the document in the application.

public event EventHandler<Avalonia.Controls.PdfSaveAsRequestedEventArgs> SaveAsRequested

SearchCompleted Event​

Raised when a search completes (including programmatic Avalonia.Controls.PdfViewer.SearchAsync(string,Avalonia.Controls.Pdf.Core.SearchOptions)).

public event EventHandler<Avalonia.Controls.PdfSearchCompletedEventArgs> SearchCompleted

ShareRequested Event​

Raised when sharing is requested (menu, Avalonia.Controls.PdfViewer.Share, Avalonia.Controls.PdfViewer.ShareAsync(Avalonia.Controls.Pdf.Services.ShareOptions,System.Threading.CancellationToken) or Avalonia.Controls.PdfViewer.ShareCommand) before the built-in share service runs. Set Avalonia.Controls.PdfShareRequestedEventArgs.Handled to share in the application instead.

public event EventHandler<Avalonia.Controls.PdfShareRequestedEventArgs> ShareRequested

UndoRedoStateChanged Event​

Raised whenever Avalonia.Controls.PdfViewer.CanUndo or Avalonia.Controls.PdfViewer.CanRedo changes.

public event EventHandler UndoRedoStateChanged

ZoomChanged Event​

Raised when Avalonia.Controls.PdfViewer.ZoomLevel changes.

public event EventHandler<Avalonia.Controls.PdfZoomChangedEventArgs> ZoomChanged

On this page