wpf-devexpress-dot-xpf-dot-editors-dot-baseedit-dcce2aa4.md
Gets or sets the text displayed within the edit box when the editor’s value is null. This is a dependency property.
Namespace : DevExpress.Xpf.Editors
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public string NullText { get; set; }
Public Property NullText As String
| Type | Description |
|---|---|
| String |
A String value that specifies the string displayed within the edit box when the BaseEdit.EditValue property is set to null or Value value.
|
The BaseEdit.NullValue property allows you to specify a null value for the editor, in addition to null and DBNull values.
To specify the text displayed within the edit box when the editor’s value is null, use the NullText property. Its visibility is specified by the BaseEdit.ShowNullText property.
<dxe:PasswordBoxEdit NullText="Please enter your password..." />
Use the TextEditBase.NullTextForeground property to change the null text’s foreground color.
The following code snippets (auto-collected from DevExpress Examples) contain references to the NullText 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.
wpf-synchronous-theme-preload-with-splashscreen/CS/ThemePreloadwithSplashscreen/MainWindow.xaml#L16
VerticalAlignment="Center">
<dxe:TextEdit NullText="login" />
<dxe:PasswordBoxEdit Margin="0,10" NullText="password" />
wpf-create-a-fluent-design-using-appearance-options/CS/FluentDesignTemplate/MainWindow.xaml#L43
</dx:WpfSvgPalette.Palette>
<dxe:ButtonEdit Background="#1FFFFFFF" Margin="0,0,30,0" Width="230" NullText="Search everywhere..." BorderThickness="0" BorderBrush="Transparent" AllowDefaultButton="False">
<dxe:ButtonInfo IsLeft="True" GlyphKind="Custom">
wpf-themes-use-palette-resources-in-custom-controls/CS/DXSample/MainWindow.xaml#L10
<StackPanel>
<dxe:ComboBoxEdit Grid.Row="0" x:Name="comboBoxEdit1" NullText="Select a theme..." IsTextEditable="False" EditValueChanged="comboBoxEdit1_EditValueChanged" SelectedIndex="0">
<dxe:ComboBoxEdit.ItemsSource>
See Also