Skip to main content
A newer version of this page is available. .

TextEdit Class

Represents a text editor with embedded buttons.

Namespace: DevExpress.UI.Xaml.Editors

Assembly: DevExpress.UI.Xaml.Editors.v18.2.dll

Declaration

[ToolboxTabName("DX.18.2: Common Controls")]
public class TextEdit :
    BaseEdit

Remarks

TextEdit editors allow display of a text editor, a dropdown and an unlimited number of buttons.

TextEdit

To display custom buttons, create ButtonInfo objects and add them to the TextEdit.Buttons collection.

Example

This example shows how to create a simple TextEdit that displays a text field and a button that clears the entered text.

using System;
using Windows.UI.Xaml.Controls;

namespace TextEdit_example {
    public sealed partial class MainPage : Page {
        public MainPage() {
            this.InitializeComponent();
        }

        private void ButtonInfo_Click(object sender, EventArgs e) {
            textEdit.EditValue = string.Empty;
        }
    }
}
<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:TextEdit_example"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Editors="using:DevExpress.UI.Xaml.Editors"
    x:Class="TextEdit_example.MainPage"
    mc:Ignorable="d">

    <Grid>

        <Editors:TextEdit Name="textEdit" HorizontalAlignment="Center" VerticalAlignment="Center" Width="250" ShowDefaultButtons="False">
            <Editors:TextEdit.Buttons>
                <Editors:ButtonInfo Content="Clear" Click="ButtonInfo_Click" />
            </Editors:TextEdit.Buttons>
        </Editors:TextEdit>

    </Grid>
</Page>

Inheritance

Object
Windows.UI.Xaml.DependencyObject
Windows.UI.Xaml.UIElement
Windows.UI.Xaml.FrameworkElement
Windows.UI.Xaml.Controls.Control
DevExpress.Core.Native.DXControl
See Also