consider the following scenario:
<TextBox Text="{Binding Price}"/>
here is the Price property
public Decimal Price
{
get
{
return _Price;
}
set
{
if (_Price != value)
{
_Price = value;
OnPropertyChanged("Price");
}
}
}
this method examines my property
private string validateGlassPrice()
{
if (GlassPrice <= 0)
{
return "price can't be 0 nor a minus value ";
}
else
{
return String.Empty;
}
}
this method examines my property if it was 0 or less - a minus value - now I need to examine if it is null or empty too, the problem is that Decimal won't accept nullable values, any workarounds ?
thanks in advance