FontEdit

Overview

The FontEdit control is a dropdown editor that allows end-users to select the required font.

FontEdit

The FontEdit control offers the following features.

  • Easy initialization

    The FontEdit's dropdown automatically displays all fonts that are installed in the system.

  • Automatic completion

    The FontEdit control supports automatic completion. As the user types into the editor's text box, the suggested font name is displayed.

  • Optimized for in-place editing

    FontEdit can be used standalone or as an in-place editor nested in a container control. The FontEditSettings class implements the in-place editing functionality. See In-place Editors to learn more.

Standalone FontEdit

To add a standalone FontEdit to a Window, drag it from the Toolbox.

The following sample demonstrates how to create a FontEdit using XAML markup and change the TextEdit's font family using the FontEdit.

<Window 
...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <StackPanel>
        <dxe:FontEdit x:Name="fontEdit1" EditValue="Segoe UI"/>
        <dxe:TextEdit FontFamily="{Binding ElementName=fontEdit1, Path=EditValue}" EditValue="Hello World!"/>
    </StackPanel>
</Window>

In-place FontEdit

To embed a FontEdit into a container control, use the FontEditSettings class.

The following sample demonstrates how to embed a FontEdit into a GridControl column.

<dxg:GridControl Name="grid">
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="Font">
        <dxg:GridColumn.EditSettings>
            <dxe:FontEditSettings/>
        </dxg:GridColumn.EditSettings>
    </dxg:GridColumn>
</dxg:GridControl.Columns>
</dxg:GridControl>