Recommended

Skip Navigation LinksHome / News / View News

Watermarked Textbox Part II

+ Add to SilverlightShow Favorites
2 comments   /   posted by Phil Middlemiss on Mar 05, 2010
(1 votes)
Part II of the tutorial of Phil Middlemiss on building a Watermarked Textbox control is now here. In the first post Phil created the visual elements for the WatermarkedTextbox user control.

Watermarked Textbox imageIn Part II we finish defining the visual elements, and create the animations for the various states the control requires
Share


Comments

Comments RSS RSS
  • RE: Watermarked Textbox Part II  

    posted by SilverFan on Mar 06, 2010 16:07
    The implementation is wrong for multiple reasons.

    1)It should be a control (not usercontrol) so it can be fully customizable.The user cant customize the watermark textblock, the clear button etc.
    Can i localize the button tooltip? no
    Can i change the watermark textblock style? no
    It could even be a TextBox.
    A watermark textbox IS a textbox!!
    2)Following the first every part and state should be documented in the class the way every silverlight control is designed.
    3)It should provide events for pretty much everything (textchanged ,watermarkchanged, clear clicked etc) alongside the MVVM ICommand aproach cause not everybody uses the pattern.
    4)The implementation does not respect bindings.
    The text is not bound to the textbox so it wont validate! if an exception is thrown from the source.No templatebindings also for various properties because its not a stylable control!

    All in all bad impl.I suggest u read more about silvelight and most importantly read good silverlight code from the sl toolkit source code.
  • RE: Watermarked Textbox Part II  

    posted by micaleel on Mar 15, 2010 13:36
    SiverFan, please back off! There is nothing constructive about your critism, please try to provide positive contributions next time.

Add Comment

 
 

   
  
  
   
Please add 8 and 6 and type the answer here:

Join the free SilverlightShow webinar 'Silverlight's Power Features: Data Binding in Action' on August 19th 2010, 10:00 am PDT.
In this session Gill Cleeren will make with a complete overview of the data binding features Silverlight 4 has to offer. He will discuss how data binding is the enabler for applying the MVVM pattern and commanding, and will end up reviewing Blend's support for data binding, including the use of design-time data. Read more | Register Now (hide this)