Skip to main content
All docs
V26.1
  • SvgImageLimits.MaxReferencedElementCount Property

    Specifies the maximum number of referenced elements that the SVG renderer draws in one image.

    Namespace: DevExpress.Utils.Svg

    Assembly: DevExpress.Data.v26.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public static int MaxReferencedElementCount { get; set; }

    Property Value

    Type Description
    Int32

    The maximum number of referenced elements. The default value is DefaultMaxReferencedElementCount (16,384). 0 disables the limit.

    Remarks

    The renderer skips referenced elements over the limit and renders the image partially. In this instance, the renderer writes the following warning to trace listeners: “The SVG image is rendered partially: …”.

    The limit applies to the entire process. Set the property once at application startup, before the application loads SVG images.

    Warning

    Raise or disable this limit only if all SVG images in your application come from trusted sources. An SVG image with many referenced elements from an untrusted source can cause a denial of service.

    using DevExpress.Utils.Svg;
    
    // Call at application startup.
    SvgImageLimits.MaxReferencedElementCount = 64 * 1024;
    

    For additional information, refer to the following help topic: SVG Image Limits.

    See Also