The Accelerator supports adding placeholder text to Textboxes and Dropdowns for the purpose of showing instructions to a user before they've entered a value. To add Placeholder text to your inputs, see the instructions below.


To add Placeholder text to AB_FieldWithLabel controls

  • Set ap_PlaceholderText to the text you want to show.
  • Set ap_IsPlaceholderTextVisible to 'True'.

    Example

XAML
<base:AB_FieldWithLabel ap_PlaceholderText="Enter Product number" ap_IsPlaceholderTextVisible="True" ... />

To add Placeholder text to AB_DropDownBase controls

  • Add an event handler to the dropdowns 'Loaded' event.
  • In the event handler, set ap_ComboDropDownPlaceHolderText on the MainComboBox control inside of the Dropdown to the text you want to show.

    Example

XAML
<base:AB_DropDownBase x:Name="Field_ProductDropdown" Loaded="Field_ProductDropdown_Loaded" ... />
C#
private void Field_ProductDropdown_Loaded(object sender, RoutedEventArgs e)
{
    AB_DropDownBase dropdown = sender as AB_DropDownBase;
    if (dropdown == null || dropdown.ap_MainComboBox == null)
        return;

    dropdown.ap_MainComboBox.ap_ComboDropDownPlaceHolderText = "Select a Product";
}