Partilhar via


SpriteFont.DefaultCharacter Property

Gets or sets the default character for the font.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

public Nullable<char> DefaultCharacter { get; set; }

Property Value

The default character for this font.

Remarks

If set to anything other than null, this character will be automatically substituted any time an attempt is made to draw or measure characters that are not in the font.

If set to null, missing characters will produce an exception.

See Also

Reference

SpriteFont Class
SpriteFont Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP