One breaking change you may have noticed between Silverlight 2 Beta 1 and Beta 2 is that WatermarkedTextBox is no longer available in the Silverlight SDK (System.Windows.Controls.Extended.dll). 

We decided to remove the control because in a future version of Silverlight, we will be adding a “Watermark” property to TextBox. Given this upcoming change, it does not make sense to have "WatermarkedTextBox" as a separate control, so we decided to remove the control from Silverlight 2.

Because the update to TextBox will not happen until a future version of Silverlight feel free download and use the WatermarkedTextBox source code and unit test in the mean time. By downloading the source and unit tests you accept the license.

Here is an example on how to use it:

image

 

image

For more information on how to use this control, check out our Beta1 documentation in MSDN:

http://msdn.microsoft.com/en-us/library/system.windows.controls.watermarkedtextbox(VS.95).aspx

In additional to porting the source code & unit test for Beta 1, we also did the following:

  • Updated the template to use new features in the framework (i.e. VisualStateManager)
  • Bug fixing: When the control has focus, MouseOver state will no longer be active after moving the mouse away from the cotnrol
  • Bug fixing: Allow setting BorderBrush correctly

If you run into any problems, let me know! :)

<Editorial Note>
This is also a great example on how to use the new Visual State Manager for Silverlight 2 Beta 2!
Also a special "Thank you" to the WatermarkedTextBox dev Alex Bulankou for porting the source code, updating & fixing the bugs.
</Editorial Note>