-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextBox "Auto" Watermark-text #2712
Comments
@kamilkosek I think that's not so easy. Cause for this it's necessary to look at the binded property for the DisplayAttribute. I don't know yet how we can do this in an easy way. |
@punker76 Yes it is possible and easy to implement. I am working on a PR. But the requested feature is NET45 only, as the required methods are >= 4.5 |
@xxMUROxx Getting the DisplayAttrubute and Binding should be also available in .Net 4, or not? What restriction is it? |
This commit introduces the possibility to retrieve the automark text directly from the property that is used for data binding
* [Introducing] AutoWatermark #2712 This commit introduces the possibility to retrieve the automark text directly from the property that is used for data binding * Add property mapping for controls * Add AttachedPropertyBrowsableForType-Attribute * Add WatermarkAttribute * Add NET4_5 compiler switch * Add example to DateExamples.xaml * Add code to support auto-watermark on <NET4.5 too * Use DisplayAttribute instead of WatermarkAttribute * Use GetDescription instead of Description to support localizable strings * Revert XAML-Style changes introduced by mistake * Code cleanup * Add Dependency Property documentation * Subscribe to event only in case of Autowatermark is true. If control is already loaded, directly call the method for retrieving the information. If deactivated unsubscribe from event. * [Fix] Issue with DOT-binding e.g. "{Binding Property.OtherProperty}" * [Fix] Issue when using Array Indexer as binding path e.g. PropertyWithCollection[0]. This is not supported * [Fix] Issue whith using . Paths in NET4 * Allow binding to element of collection * Allow Write-Only Properties too. * Extracted Methods for better understanding * Adding XML-Documentation * Use Display.Prompt intead of Display.Description
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
and on the textbox looks e.g. like this
All the best,
Kamil
The text was updated successfully, but these errors were encountered: