问题
I am looking for some kind of WatermarkedTextBox for Windows Phone 7? But I need a custom control not how to implement Watermark behavior or how to handle the GotFocus/LostFocus events.
回答1:
This has been added to the official Windows Phone 7 Silverlight Toolkit, and as covered here. It's called PhoneTextBox and can be used like:
<toolkit:PhoneTextBox Hint="Your Text Hint"/>
回答2:
You could try this Watermark TextBox for Silverlight control, or this one. It's a popular control with many implementations out there.
来源:https://stackoverflow.com/questions/5141325/watermarkedtextbox-for-windows-phone-7