Hello, I use properties as follows:
The user can enter numbers according his wishes, he could also use the wheel of the mouse to find hins number or the arrow buttons of the keyboard.
Problem:
Everytime user scrolls through his numbers the event is triggered for each number in between, which leads to unnecessary calculations.
Example:
User enters 32 -> First calculations for 3 are done then for 32.
User increases numbers via mousewheel1 2 3 4 5 6 -> 6 events are fired, even if the user only wants to set the number finally to 6.
Question:
Is there a way to avoid this so that an event is only fired if the fiel contains the final number.
Could this be e.g. synchronised with the release of the mouse button e.g. -> tried it but did not work.
C#:
private int _deltapocminvalue = -1;
[Range(-1, int.MaxValue)]
[Display(Name = "min. Value")]
[Description("-1 = feature off, absolute values checked, no values < -1 allowed")]
public int DeltaPocMinValue
{
get => _deltapocminvalue;
set
{
object before = DeltaPocMinValue;
if (_deltapocminvalue == value) return;
if (value != -1) DeltaPocValue = CHECKIGNORE.Check;
else DeltaPocValue = CHECKIGNORE.Ignore;
_deltapocminvalue = value;
OnPropertyChanged(new PropertyValueChangedEventArgs(nameof(DeltaPocMinValue), before, DeltaPocMinValue));
}
}
The user can enter numbers according his wishes, he could also use the wheel of the mouse to find hins number or the arrow buttons of the keyboard.
Problem:
Everytime user scrolls through his numbers the event is triggered for each number in between, which leads to unnecessary calculations.
Example:
User enters 32 -> First calculations for 3 are done then for 32.
User increases numbers via mousewheel1 2 3 4 5 6 -> 6 events are fired, even if the user only wants to set the number finally to 6.
Question:
Is there a way to avoid this so that an event is only fired if the fiel contains the final number.
Could this be e.g. synchronised with the release of the mouse button e.g. -> tried it but did not work.