MVVM problem - binding only certain values
I'm new to MVVM in silverlight. It's a bit confusing because although I get the general idea, there are so many different situations where the method is not very straight forward. Here's one of them:
I have a custom text box which when set to blank shows a grayed message 'enter your text here'. The problem is, when binding to my view model I do not want the text value on the backend to be 'enter your text here', but want it to be blank. But if the user inputs ANYthing, the 'enter your text here' goes away and the backend should contain whatever the user has input. So basically it seems like this is CONDITIONAL bind开发者_StackOverflowing.
What is the best way to go about something like this?
Thanks!
It's not a conditional binding it's a watermarktextbox this things can be implemented with attached behaviors and styles.
精彩评论