Skip to main content
All docs
V25.1
  • IFormatStringStorage.GetAllPatterns() Method

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

    Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

    Assembly: DevExpress.XtraReports.v25.1.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