Back to Devexpress

DocumentSaveOptions.CurrentFileName Property

officefileapi-devexpress-dot-xtrarichedit-dot-documentsaveoptions.md

latest7.0 KB
Original Source

DocumentSaveOptions.CurrentFileName Property

Gets or sets the file name into which the document is saved or from which it is loaded.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public string CurrentFileName { get; set; }
vb
Public Property CurrentFileName As String

Property Value

TypeDescription
String

A String which represents the current file name (including the path and the file extension).

|

Property Paths

You can access this nested property as listed below:

Object TypePath to CurrentFileName
RichEditControlOptionsBase

.DocumentSaveOptions .CurrentFileName

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the CurrentFileName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-load-a-document-into-the-richedit-control/CS/LoadDocumentExample/Form1.cs#L19

csharp
{
    string documentName = richEditControl1.Options.DocumentSaveOptions.CurrentFileName;
    string msg;

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/CS/SyntaxHighlightSimple/MainWindow.xaml.cs#L118

csharp
// Determine language by file extension.
string ext = Path.GetExtension(syntaxEditor.Options.DocumentSaveOptions.CurrentFileName);
ParserLanguageID lang_ID = ParserLanguage.FromFileExtension(ext);

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/CodeUtils/SyntaxHightlight.cs#L91

csharp
private ITokenCategoryHelper CreateTokenizer() {
    string fileName = editor.Options.DocumentSaveOptions.CurrentFileName;
    string extenstion;

wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/CodeUtils/SyntaxHightlight.cs#L105

csharp
{
    string fileName = editor.Options.DocumentSaveOptions.CurrentFileName;
    string extenstion;

winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/CodeUtils/SyntaxHightlight.cs#L91

csharp
private ITokenCategoryHelper CreateTokenizer() {
    string fileName = editor.Options.DocumentSaveOptions.CurrentFileName;
    string extenstion;

how-to-load-a-document-into-the-richedit-control/VB/LoadDocumentExample/Form1.vb#L17

vb
Private Sub RichEditControl1_DocumentLoaded(ByVal sender As Object, ByVal e As EventArgs)
    Dim documentName As String = richEditControl1.Options.DocumentSaveOptions.CurrentFileName
    Dim msg As String

syntax-highlighting-for-c-and-vb-code-using-devexpress-codeparser-and-syntax-highlight-tokens/VB/SyntaxHighlightSimple/MainWindow.xaml.vb#L110

vb
' Determine language by file extension.
Dim ext As String = Path.GetExtension(syntaxEditor.Options.DocumentSaveOptions.CurrentFileName)
Dim lang_ID As ParserLanguageID = ParserLanguage.FromFileExtension(ext)

wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/CodeUtils/SyntaxHightlight.vb#L93

vb
Private Function CreateTokenizer() As ITokenCategoryHelper
    Dim fileName As String = editor.Options.DocumentSaveOptions.CurrentFileName
    Dim extenstion As String

wpf-spreadsheet-pivot-table-api-examples/VB/SpreadsheetWPFPivotTableExamples/CodeUtils/SyntaxHightlight.vb#L93

vb
Private Function CreateTokenizer() As ITokenCategoryHelper
    Dim fileName As String = editor.Options.DocumentSaveOptions.CurrentFileName
    Dim extenstion As String

winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/CodeUtils/SyntaxHightlight.vb#L93

vb
Private Function CreateTokenizer() As ITokenCategoryHelper
    Dim fileName As String = editor.Options.DocumentSaveOptions.CurrentFileName
    Dim extenstion As String

See Also

CurrentFormat

DefaultFileName

DefaultFormat

DocumentSaveOptions Class

DocumentSaveOptions Members

DevExpress.XtraRichEdit Namespace