C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




about silverlight


Posted Date: 30 Jul 2008      Total Responses: 5

Posted By: Lakshmankumar M       Member Level: Gold     Points: 1


Hi all,
I am using silverlight 2.0.....Plz tel me in that how to use watremarkedtextbox...




Responses

Author: Shivshanker Cheral    30 Jul 2008Member Level: DiamondRating:     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 2008Member Level: GoldRating:     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 2008Member Level: GoldRating:     Points: 1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1787898&SiteID=1



Author: Deepa    31 Jul 2008Member Level: DiamondRating:     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 2008Member Level: SilverRating:     Points: 2
http://www.microsoft.com/india/smb/what_to_buy/developer_tool/silverlight.mspx

Thanks
http://www.interviewsworld.com


Post Reply
You must Sign In to post a response.
Next : Silverlight
Previous : about watrmarktextbox..
Return to Discussion Forum
Post New Message
Category: Silverlight

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use