Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Customize the Appearance of a Standalone Editor

The following code sample customizes the visual appearance of a standalone editor:

WPF TextEdit - EditTemplate Example

<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
    xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal">
    <dxe:TextEdit Width="130" HorizontalAlignment="Center"
                  VerticalAlignment="Center" EditValue="USA" ShowBorder="False">
        <dxe:TextEdit.EditTemplate>
            <ControlTemplate>
                <Border BorderBrush="Orange" BorderThickness="3" CornerRadius="7">
                    <DockPanel>
                        <TextBlock Margin="2" VerticalAlignment="Center" Foreground="Gray" Text="Country:" />
                        <TextBox Name="PART_Editor" Margin="2"
                                 Style="{dxi:ThemeResource {dxet:TextEditThemeKey ResourceKey=TextStyle}}" />
                    </DockPanel>
                </Border>
            </ControlTemplate>
        </dxe:TextEdit.EditTemplate>
    </dxe:TextEdit>
</Window>

Refer to the following help topic for more information: Modify Theme Resources.