Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
xamNumericInput not updating data correctly
posted

I have this property bound twoway to the text property of the Numeric Input, where maxQuantity is a value i set somewhere else. I dont want the user to be able to input anything above that maxQuantity value. I found when the user is typing the value in, the property is getting set correctly but it isnt actually changing the textbox and this only happens while the cursor is on the textbox. if i attempt to update this property without the cursor being on the textbox (through some other event) it updates fine. theres only an issue when the cursor is there. any ideas?

public int TransferQuantity
{
get
{
return this.TransferQuantity;
}
set
{
if (this.TransferQuantity != value)
{

if (value <= MaxQuantity && value >= 0)
{
this.TransferQuantity = value;
}
else if (value > MaxQuantity)
{
this.TransferQuantity = MaxQuantity;
}
else
{
this.TransferQuantity = 0;

}

}
OnPropertyChanged("TransferQuantity");
}
}