You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
#需求:我有两个textbox,需要用户分别输入最大,最小值。限制客户输入的值(最小不能大于最大,最大不能小于最小,不然为默认值)。

##问题:正常来说直接在属性里 SetProperty(ref max,value)前,判断就行了类似与
。但是源生成器将他封装起来了。无法直接写在里面。
##尝试:有人向我推荐ObservableValidator。但我搜出来的示例发现,他还是能输入,只是显示限制信息,并没有限制到输入。
目前使用Partial OnpropertyChanged方法在方法里面做判断。但是既然是~ed 那就还是Change后的。有没有在输入时/给属性赋值前就做判断的方法呢?搜那些关键字
Beta Was this translation helpful? Give feedback.
All reactions