Back to Devexpress

FavoritePropertyDirectoryExtension Class

xtrareports-devexpress-dot-xtrareports-dot-extensions-f5e758f7.md

latest4.0 KB
Original Source

FavoritePropertyDirectoryExtension Class

Provides the functionality to store the Property panel’s favorite properties in a file system.

Namespace : DevExpress.XtraReports.Extensions

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
public class FavoritePropertyDirectoryExtension :
    FavoritePropertyExtension
vb
Public Class FavoritePropertyDirectoryExtension
    Inherits FavoritePropertyExtension

Remarks

The End-User Report Designer’s Properties panel provides the Favorite view that allows end-users to display only their favorite or most frequently used properties.

The FavoritePropertyDirectoryExtension class is inherited from the abstract FavoritePropertyExtension class and is intended to manage persisting favorite properties in a file system. By default, these properties are stored in the %localappdata%\Developer Express Inc\XtraReports Suite\ComponentProperties.xml file.

To provide a custom file storage, you can create an instance of the ReportGalleryDirectoryExtension class with the required path passed as a parameter, and register this instance using the static RegisterExtensionGlobal method.

The following code snippet demonstrates how to specify the path to the directory with the application’s executable file.

csharp
using System.Windows.Forms;
using System.IO;
using DevExpress.XtraReports.Extensions;

static class Program {
    static void Main() {
        // ...
        string path = Path.Combine(Application.StartupPath, "FavoriteProperties.xml");
        FavoritePropertyExtension.RegisterExtensionGlobal(new FavoritePropertyDirectoryExtension(path));
    }
}
vb
Imports System.Windows.Forms
Imports System.IO
Imports DevExpress.XtraReports.Extensions

Module Program
    Private Sub Main()
        ' ...
        Dim path As String = Path.Combine(Application.StartupPath, "FavoriteProperties.xml")
        FavoritePropertyExtension.RegisterExtensionGlobal(New FavoritePropertyDirectoryExtension(path))
    End Sub
End Module

See the following topics for more information:

Inheritance

Object FavoritePropertyExtension FavoritePropertyDirectoryExtension

See Also

FavoritePropertyDirectoryExtension Members

DevExpress.XtraReports.Extensions Namespace