Back to Devexpress

TextEditBase.Text Property

wpf-devexpress-dot-xpf-dot-editors-dot-texteditbase-7c8d7a22.md

latest6.7 KB
Original Source

TextEditBase.Text Property

Gets or sets the editor’s text. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public string Text { get; set; }
vb
Public Property Text As String

Property Value

TypeDescription
String

A String value that specifies the editor’s text.

|

Remarks

Use the BaseEdit.DisplayText property to obtain the actual text the editor displays (for example, with the formatting or culture settings).

The Text property is a string value. The BaseEdit.EditValue property value’s type is the object’s type and corresponds to the current setting (MaskType, EditValueType, etc.).

The following code snippets (auto-collected from DevExpress Examples) contain references to the Text property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-wpf-stretch-detail-area-to-fill-the-page/CS/Window1.xaml#L14

xml
<DataTemplate x:Key="pageHeader">
    <dxe:TextEdit Text="This is a page header" Background="LightGray" Height="{StaticResource pageHeaderHeight}" />
</DataTemplate>

reporting-wpf-use-collectionview-link/CS/Window1.xaml#L12

xml
<DataTemplate x:Key="monthNameTemplate">
    <dxe:TextEdit Text="{Binding Path=Content.Name, Mode=OneWay}" />
</DataTemplate>

reporting-wpf-hide-specific-export-formats-from-the-document-preview-control/CS/HideExportFormats/MainWindow.xaml#L14

xml
<DataTemplate x:Key="dayNameTemplate">
    <dxe:TextEdit IsPrintingMode="True" Text="{Binding Path=Content}" />
</DataTemplate>

wpf-accordion-bind-to-data-hierarchicaldatatemplate/CS/HierarchicalDataTemplate/MainWindow.xaml#L38

xml
<Label Margin="5" VerticalAlignment="Center">Item Name</Label>
    <dxe:TextEdit Margin="5" Width="150" Text="{Binding SelectedItem.Description}"/>
</StackPanel>

wpf-accordion-bind-to-data-using-childrenpath/CS/ChildrenPath/MainWindow.xaml#L28

xml
<Label Margin="5" VerticalAlignment="Center">Item Name</Label>
<dxe:TextEdit Margin="5" Text="{Binding SelectedItem.Caption,
    UpdateSourceTrigger=PropertyChanged}" Width="150"/>

wpf-map-search-with-azure-map-search-service/CS/DXMapExample/MainWindow.xaml.cs#L14

csharp
private void Search_Click(object sender, RoutedEventArgs e) {
    searchDataProvider.Search(teKeywords.Text);
}

wpf-richedit-document-encryption/CS/DXRichEdit_Encryption/MainWindow.xaml.cs#L33

csharp
{
    passwordEdit.Text = "test";

wpf-pdf-viewer-draw-a-rectangle-over-a-document/CS/MainWindow.xaml.cs#L35

csharp
txtText.Text = pdfView.GetText(pdfDocumentArea);
txtPositions.Text = $"Start position: {args.StartPosition.Point.X}, {args.StartPosition.Point.Y}\nEnd Position: " +

wpf-richedit-use-document-iterator-and-visitor/CS/DocumentIteratorExample/MainWindow.xaml.cs#L35

csharp
iterator.Current.Accept(visitor);
    textEdit1.Text = visitor.Text;
}

wpf-map-search-with-azure-map-search-service/VB/DXMapExample/MainWindow.xaml.vb#L16

vb
Private Sub Search_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Me.searchDataProvider.Search(Me.teKeywords.Text)
End Sub

wpf-pdf-viewer-draw-a-rectangle-over-a-document/VB/MainWindow.xaml.vb#L24

vb
Dim pdfDocumentArea As PdfDocumentArea = New PdfDocumentArea(args.StartPosition.PageNumber, rect)
Me.txtText.Text = Me.pdfView.GetText(pdfDocumentArea)
Me.txtPositions.Text = $"Start position: {args.StartPosition.Point.X}, {args.StartPosition.Point.Y}

See Also

Obtaining Values in Display and Edit Modes

DisplayText

TextEditBase Class

TextEditBase Members

DevExpress.Xpf.Editors Namespace