Skip to main content Skip to footer

Silverlight 4 Introduces Watermark Issue

Like every version, Silverlight 4 adds new properties to existing types. One new property Microsoft added is TextBox.Watermark. ComponentOne already had a Watermark property defined for our C1TextBoxBase, which is a subclass of TextBox.

Due to this change, if an application built against Silverlight 2 or 3 sets C1TextBoxBase.Watermark in XAML, it will generate an exception in Silverlight 4. This is because of a limitation with the Silverlight 2/3 parsers and results in the parser not knowing which Watermark property to use; TextBox.Watermark or C1TextBoxBase.Watermark. Basically, anytime a base class and a subclass have multiple properties of the same name it will generate this type of exception. Microsoft claims the limitation of the Silverlight 2 and 3 parsers is nothing new, it's just that the TextBox.Watermark property is new. The issue is present in Silverlight 4 RC and RTM (out next week).

Several ComponentOne controls inherit or use C1TextBoxBase:

  • C1NumericBox
  • C1MaskedTextBox
  • C1ComboBox
  • C1FilePicker
  • C1TimeEditor
  • C1TextEditableContentControl

If this issue pertains to you, you should rebuild your applications after removing the Watermark property from your code. We will also be including updated Silverlight 3 bits that will work around this issue in the next release.

ComponentOne Product Manager Greg Lutz

Greg Lutz

comments powered by Disqus