if (control is TextBox)
{
var textBox = (TextBox)control;
textBox...
}
Also, it would be great if Microsoft could make full properties in another way so that you do not have to write a backing field for it. Something like this: public string LastName
{
get;
set
{
if (value == "Batina")
RaisePropertyChanged();
}
}
It would make code more cleaner.