Override text property of textbox
how to override text property in textbox in wpf ?
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.
Ar GorginPosted Sep 29, 2011, 12:48 AM
thanks a lot
i want this code in wpf:
public override string Text
{
get { return Text.Replace(",", ""); }
set { Text = value; }
}
thanks for your guide .
Lalit MPosted Sep 28, 2011, 6:38 AM
this link might be help you pls visit this link
Hope Help.!
if help then kindly check in check box..
Thanks Advance...
Ar GorginPosted Sep 28, 2011, 6:25 AM
public string Text
{
get
{
return (string) base.GetValue(TextProperty);
}
set
{
base.SetValue(TextProperty, value);
}
}
thanks for your guide .
Santosh KumarPosted May 18, 2011, 2:48 AM
Notice that the DependencyProperty also registers a PropertyChangedCallback for what you are trying to do.
This is how the Text property is implemented in the TextBox class:
public string Text
{
get
{
return (string) base.GetValue(TextProperty);
}
set
{
base.SetValue(TextProperty, value);
}
}