skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadWatermarkTextBox

This class represents a TextBox that shows a different content when empty and not focused.

Inheritance
System.Object
RadWatermarkTextBox
RadPasswordBox
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll

Syntax

[TelerikToolboxCategory("Input")]
public class RadWatermarkTextBox : TextBox, IThemable

Constructors

RadWatermarkTextBox()

Initializes a new instance of the RadWatermarkTextBox class.

Declaration
public RadWatermarkTextBox()

Fields

AdditionalContentProperty

Identifies the AdditionalContent property.

Declaration
public static readonly DependencyProperty AdditionalContentProperty
Field Value
System.Windows.DependencyProperty

AdditionalContentTemplateProperty

Identifies the AdditionalContentTemplate property.

Declaration
public static readonly DependencyProperty AdditionalContentTemplateProperty
Field Value
System.Windows.DependencyProperty

CurrentTextProperty

Identifies the CurrentText dependency property.

Declaration
public static readonly DependencyProperty CurrentTextProperty
Field Value
System.Windows.DependencyProperty

DisabledBackgroundProperty

Identifies the DisabledBackground property.

Declaration
public static readonly DependencyProperty DisabledBackgroundProperty
Field Value
System.Windows.DependencyProperty

HasLabelProperty

Identifies the HasLabel dependency property.

Declaration
public static readonly DependencyProperty HasLabelProperty
Field Value
System.Windows.DependencyProperty

IsLabelFloatedProperty

Identifies the IsLabelFloated dependency property.

Declaration
public static readonly DependencyProperty IsLabelFloatedProperty
Field Value
System.Windows.DependencyProperty

IsWatermarkVisibleProperty

Identifies the IsWatermarkVisible dependency property.

Declaration
public static readonly DependencyProperty IsWatermarkVisibleProperty
Field Value
System.Windows.DependencyProperty

KeepLabelFloatedProperty

Identifies the KeepLabelFloated dependency property.

Declaration
public static readonly DependencyProperty KeepLabelFloatedProperty
Field Value
System.Windows.DependencyProperty

LabelProperty

Identifies the Label dependency property.

Declaration
public static readonly DependencyProperty LabelProperty
Field Value
System.Windows.DependencyProperty

LabelStyleProperty

Identifies the LabelStyle dependency property.

Declaration
public static readonly DependencyProperty LabelStyleProperty
Field Value
System.Windows.DependencyProperty

ReadOnlyBackgroundProperty

Identifies the ReadOnlyBackground property.

Declaration
public static readonly DependencyProperty ReadOnlyBackgroundProperty
Field Value
System.Windows.DependencyProperty

SelectionOnFocusProperty

Identifies the SelectionOnFocus property.

Declaration
public static readonly DependencyProperty SelectionOnFocusProperty
Field Value
System.Windows.DependencyProperty

WatermarkBehaviorProperty

Identifies the WatermarkBehavior property.

Declaration
public static readonly DependencyProperty WatermarkBehaviorProperty
Field Value
System.Windows.DependencyProperty

WatermarkContentProperty

Identifies the WatermarkContent dependency property.

Declaration
public static readonly DependencyProperty WatermarkContentProperty
Field Value
System.Windows.DependencyProperty

WatermarkTemplateProperty

Identifies the WatermarkTemplate dependency property.

Declaration
public static readonly DependencyProperty WatermarkTemplateProperty
Field Value
System.Windows.DependencyProperty

Properties

AdditionalContent

Gets or sets an object which is rendered in ContentPresenter in the right part of the control.

Declaration
public object AdditionalContent { get; set; }
Property Value
System.Object

AdditionalContentTemplate

Gets or sets the System.Windows.DataTemplate used for the AdditionalContent object.

Declaration
public DataTemplate AdditionalContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate

CurrentText

Gets or sets the text of the TextBox. This property is meant to be used for TwoWay binding in order to be updated on each change of the text and not when the focus is lost.

Declaration
public string CurrentText { get; set; }
Property Value
System.String

DisabledBackground

Gets a value that specifies the background of the control when in disabled state.

Declaration
public Brush DisabledBackground { get; set; }
Property Value
System.Windows.Media.Brush

HasLabel

Gets a boolean value indicating whether there is a label.

Declaration
public bool HasLabel { get; }
Property Value
System.Boolean

IsLabelFloated

Gets a boolean value indicating whether the label is floated.

Declaration
public bool IsLabelFloated { get; }
Property Value
System.Boolean

IsWatermarkVisible

Gets a value indicating whether the Watermark is visible or not.

Declaration
public bool IsWatermarkVisible { get; }
Property Value
System.Boolean

KeepLabelFloated

Gets or sets a boolean value indicating whether the label should always stay floated on top.

Declaration
public bool KeepLabelFloated { get; set; }
Property Value
System.Boolean

Label

Gets or sets the text used as a label.

Declaration
public string Label { get; set; }
Property Value
System.String

LabelStyle

Gets or sets the style of the Label of the RadWatermarkTextBox. This is a dependency property.

Declaration
public Style LabelStyle { get; set; }
Property Value
System.Windows.Style

ReadOnlyBackground

Gets a value that specifies the background of the control when in readonly state.

Declaration
public Brush ReadOnlyBackground { get; set; }
Property Value
System.Windows.Media.Brush

SelectionOnFocus

Specifies the modification over the selection when the control receives focus.

Declaration
public SelectionOnFocus SelectionOnFocus { get; set; }
Property Value
SelectionOnFocus

WatermarkBehavior

Gets a value that specifies when the watermark content of control will be hidden.

Declaration
public WatermarkBehavior WatermarkBehavior { get; set; }
Property Value
WatermarkBehavior

WatermarkContent

Gets or sets the content to be shown when the TextBox is empty and not focused.

Declaration
public object WatermarkContent { get; set; }
Property Value
System.Object

WatermarkTemplate

Gets or sets the template for presenting the content, shown when the TextBox is empty and not focused.

Declaration
public DataTemplate WatermarkTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Methods

EndInit()

Indicates that the initialization process for the element is complete.

Declaration
public override void EndInit()

HandleClear()

Called, when the Clear command is invoked.

Declaration
protected virtual void HandleClear()

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate(). In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

Declaration
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

OnInitialized(EventArgs)

Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.

Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs e

The System.Windows.RoutedEventArgs that contains the event data.

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyPropertyChangedEventArgs e

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.