Back to Devexpress

DocumentViewerControl.OpenDocument(String) Method

wpf-devexpress-dot-xpf-dot-documentviewer-dot-documentviewercontrol-dot-opendocument-x28-system-dot-string-x29.md

latest1.6 KB
Original Source

DocumentViewerControl.OpenDocument(String) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Loads the document from the specified file and opens it in the viewer.

Namespace : DevExpress.Xpf.DocumentViewer

Assembly : DevExpress.Xpf.DocumentViewer.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.DocumentViewer.Core

Declaration

csharp
public virtual void OpenDocument(
    string filePath = null
)
vb
Public Overridable Sub OpenDocument(
    filePath As String = Nothing
)

Optional Parameters

NameTypeDefaultDescription
filePathStringnull

A String specifying the full path to a document file.

|

See Also

DocumentViewerControl Class

DocumentViewerControl Members

DevExpress.Xpf.DocumentViewer Namespace