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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Santosh KumarRank #2,303 · 613 reputationPosted May 17, 2011, 10:48 PM EDT
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);
}
}
Ar Gorgin97 reputationPosted Sep 28, 2011, 2:25 AM EDT
public string Text
{
get
{
return (string) base.GetValue(TextProperty);
}
set
{
base.SetValue(TextProperty, value);
}
}
thanks for your guide .
Lalit MRank #1,186 · 1.5K reputationPosted Sep 28, 2011, 2:38 AM EDT
this link might be help you pls visit this link
Hope Help.!
if help then kindly check in check box..
Thanks Advance...
Ar Gorgin97 reputationPosted Sep 28, 2011, 8:48 PM EDT
thanks a lot
i want this code in wpf:
public override string Text
{
get { return Text.Replace(",", ""); }
set { Text = value; }
}
thanks for your guide .