Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IFormatStringStorage.GetAllPatterns() Method

Returns a dictionary whose elements contain a type and a format string.

Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

Assembly: DevExpress.XtraReports.v24.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

#Declaration

Dictionary<string, string[]> GetAllPatterns()

#Returns

Type Description
Dictionary<String, String[]>

A dictionary that contains pairs of strings.

#Remarks

Use the GetAllPatterns to create format strings that will be added to the format string list returned from the GetAllDateTimePatterns() method.

The following code snippet implements a service that adds a d format string to the strings shown in the DateTime category:

Format String editor and a custom format string using IFormatStringStorage service

using System;
using System.Collections.Generic;
using DevExpress.XtraReports.Web.ReportDesigner.Services;

public class CustomFormatStringStorage : IFormatStringStorage {
    protected Dictionary<string, string[]> CustomSet { get; private set; }
    public virtual Dictionary<string, string[]> GetAllPatterns() {
        CustomSet = new Dictionary<string, string[]> {
            { "System.DateTime", new string[] { "d" } }
        };
        return CustomSet;
    }

    public bool Save(string typeString, string pattern) {
        return false;
    }

    public bool Remove(string typeString, string pattern) {
         return false;
    }
}
See Also