| Author: Shivshanker Cheral 30 Jul 2008 | Member Level: Diamond | Rating: Points: 0 |
WatermarkedTextBox for Silverlight 2 Beta 2 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.
Kathy has all the details on her blog, but you can download the WatermarkedTextBox source code and unit test here.
refer
http://blogs.msdn.com/brada/archive/2008/06/24/watermarkedtextbox-for-silverlight-2-beta-2.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1787898&SiteID=1
|
| Author: chandramohan 30 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
http://silverlight.net/Quickstarts/Start/CreateProject.aspx http://silverlight.net/Quickstarts/BuildUi/SplashScreen.aspx
http://silverlight.net/Quickstarts/BuildUi/6ac5741f-ef92-4b8b-9919-ac7fa2c5ba09.aspx
|
| Author: chandramohan 30 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1787898&SiteID=1
|
| Author: Deepa 31 Jul 2008 | Member Level: Diamond | Rating: Points: 6 |
public partial class WatermarkBox : TextBox { private string watermark; private Color watermarkColor; private Color foreColor; private bool empty;
[Browsable (true)] public Color WatermarkColor { get { return watermarkColor; } set { watermarkColor = value; if (empty) { base.ForeColor = watermarkColor; } } }
[Browsable(true)] public string Watermark { get { return watermark; } set { watermark = value; if (empty) { base.Text = watermark; base.ForeColor = watermarkColor; } } }
public WatermarkBox () { empty = true; foreColor = ForeColor; }
[Browsable(true)] public new Color ForeColor { get { return foreColor; } set { foreColor = value; if (! empty) base.ForeColor = value; } }
public override string Text { get { if (empty) return ""; return base.Text; } set { if (value == "") { empty = true; base.ForeColor = watermarkColor; base.Text = watermark; } else base.Text = value; } }
protected override void OnGotFocus (EventArgs e) { if (empty) { empty = false; base.ForeColor = foreColor; base.Text = ""; } base.OnGotFocus (e); }
protected override void OnLostFocus (EventArgs e) { base.OnLostFocus (e); if (base.Text == "") { empty = true; base.ForeColor = watermarkColor; base.Text = watermark; } else empty = false; } }
|
| Author: InterviewsWorld 12 Aug 2008 | Member Level: Silver | Rating: Points: 2 |
http://www.microsoft.com/india/smb/what_to_buy/developer_tool/silverlight.mspx
Thanks http://www.interviewsworld.com
|