79746701

Date: 2025-08-26 10:24:16
Score: 1
Natty:
Report link

Everything I tried didn't work until I did this. I expanded my Object cointaining Count with the Properties DecimalPlaces and CountDisplay. Then I did this:

[ObservableProperty]
public decimal _count;
public int DecimalPlaces => DecimalPlacesHelper.GetDecimalPlaces(this);
public string CountDisplay => Count.ToString($"F{DecimalPlaces }");

partial void OnCountChanged(decimal value)
{
    OnPropertyChanged(nameof(CountDisplay));
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Joshie