Skip to main content
A newer version of this page is available.
All docs
V21.2
.NET Framework 4.5.2+

FontRepository.IsEmpty Property

Indicates whether the font repository is empty.

Namespace: DevExpress.Office

Assembly: DevExpress.Office.v21.2.Core.dll

NuGet Package: DevExpress.Office.Core

Declaration

public bool IsEmpty { get; }

Property Value

Type Description
Boolean

true if the font repository contains no fonts; otherwise, false.

Example

The following code sample retrieves the names of all fonts in the repository and displays this information in the console window:

using DevExpress.Office;
using System;
using System.Collections.Generic;
// ...

if (FontRepository.Instance.IsEmpty)
    Console.WriteLine("Font repository is empty.");
else
{
    Console.WriteLine("Font repository contains the following fonts:");
    IList<FontData> fonts = FontRepository.Instance.GetFonts();
    for (int i = 0; i < fonts.Count; i++)
    {
        Console.WriteLine($"  \u002A {fonts[i].Name}");
    }
}

The following image demonstrates a sample console output:

Console Output

See Also