Quantcast
Viewing all articles
Browse latest Browse all 18858

Binding to Text but change Text when lost focus (watermark)?

Not sure how to pull this off with MVVM. I can bind a textbox to an objects property but additionally, I want to be able to set a text to the textbox when it loses focus (put a Search content). Typing in the textbox filters the collection view. How do I do about it from the ViewModel?

See attached image for the textbox:
Image may be NSFW.
Clik here to view.

I could try the solution posted here but my worry is that setting the Text in XAML would still trigger the filtering in my code (upon typing it searches a list).

http://stackoverflow.com/questions/3028494/focus-dependent-text-change-for-textboxes-in-wpf



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>