bodong1987 / Avalonia.PropertyGrid

A property edit control in Avalonia like DevExpress's PropertyGridControl.
https://www.cnblogs.com/bodong
MIT License
187 stars 19 forks source link

Bug with System.ComponentModel.DataAnnotations.RangeAttribute #38

Closed tsctsc6 closed 2 months ago

tsctsc6 commented 3 months ago

When using RangeAttribute, if max value greater than or equal to 7.9296875E+28, the PropertyGrid show not thing. For example, if one of the properties of my model class

[Range(0, 7.9296875E+28, ErrorMessage = "单价大于0")]
public double UnitPrice { get; set; } = 0;

the PropertyGrid show not thing.

Avalonia.PropertyGrid version: 11.1.1.1 Avalonia version: 11.1.1

bodong1987 commented 2 months ago

avalonia内部使用的数值是Decimal,对于这种类型来说,7.9296875E+28太大了。

tsctsc6 commented 2 months ago

I see.