HI,
I want to bind data with textbox in silverlight. what will be the code. plz, help me
Thanks, in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Sep 13, 2011, 6:42 AM
You may try this
---------------------------------------
Jiteendra SampathiraoPosted Sep 13, 2011, 1:26 AM
Good Link
Priya LingePosted Sep 13, 2011, 1:18 AM
Text="{Binding}" x:Name="textBox1"/>
public class Recording
{
public Recording() { }
public Recording(string artistName, string cdName, DateTime release)
{
Artist = artistName;
Name = cdName;
ReleaseDate = release;
}
public string Artist { get; set; }
public string Name { get; set; }
public DateTime ReleaseDate { get; set; }
// Override the ToString method.
public override string ToString()
{
return Name + " by " + Artist + ", Released: " + ReleaseDate.ToShortDateString();
}
}
...
// Set the data context to a new Recording.
textBox1.DataContext = new Recording("Chris Sells", "Chris Sells Live",
new DateTime(2008, 2, 5));
Hope this will help you.
Thanks.