Skip to content

TextBox "Auto" Watermark-text #2712

@kamilkosek

Description

@kamilkosek

What steps will reproduce this issue?

Not a real issue but a question.
Would it be possible to automatically set the watermark text to the bound property name ?
Or even better, take automatically the value of the Display-Attribute from the property as the Watermark text.
Lets say I got this Model

public class Device
    {
        [Display(Name = "Geräte Id")]
        public int DeviceId { get; set; }
        [Display(Name = "Geräte Name")]
        public string DeviceName { get; set; }
    }

and on the textbox looks e.g. like this

<StackPanel DataContext="{Binding MyDevice}">
                    <TextBox mah:TextBoxHelper.AutoWatermark="True" Text="{Binding DeviceId}"></TextBox>
                </StackPanel>

All the best,
Kamil

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions