corelibraries-devexpress-dot-drawing-dot-dxfontrepository-2a39bb4d.md
Indicates whether the font repository is empty.
Namespace : DevExpress.Drawing
Assembly : DevExpress.Drawing.v25.2.dll
NuGet Package : DevExpress.Drawing
public bool IsEmpty { get; }
Public ReadOnly Property IsEmpty As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the font repository contains no fonts; otherwise, false.
|
The following code sample retrieves the names of all fonts in the repository and displays this information in the console window:
using DevExpress.Drawing;
using System;
using System.Collections.Generic;
// ...
if (DXFontRepository.Instance.IsEmpty)
Console.WriteLine("Font repository is empty.");
else
{
Console.WriteLine("Font repository contains the following fonts:");
IList<DXFontData> fonts = DXFontRepository.Instance.GetFonts();
for (int i = 0; i < fonts.Count; i++)
{
Console.WriteLine($" \u002A {fonts[i].Name}");
}
}
Imports DevExpress.Drawing
Imports System
Imports System.Collections.Generic
' ...
If DXFontRepository.Instance.IsEmpty Then
Console.WriteLine("Font repository is empty.")
Else
Console.WriteLine("Font repository contains the following fonts:")
Dim fonts As IList(Of DXFontData) = DXFontRepository.Instance.GetFonts()
For i As Integer = 0 To fonts.Count - 1
Console.WriteLine($" " & ChrW(&H002A).ToString() & " {fonts(i).Name}")
Next i
End If
The following image demonstrates a sample console output:
See Also