c# - 为什么在 Xamarin 中将最小 100 放在步进器类上不起作用?

标签 c# xamarin argumentexception

我不明白为什么我会收到这条消息。 我问过人,他说不像100, 但我仍然想知道为什么。

I got this message....

最佳答案

原因可以在documents中找到:

Minimum - An integer or decimal literal. If this value is nonnegative, it must appear lexically below Maximum, so that validation can succeed.

这意味着您必须这样声明步进器:

stepper = new Stepper {
   Maximum = 200, //note that maximum is declared first.
   Minimum = 100,
   Value = 100,       
   Increment = 10
};

关于c# - 为什么在 Xamarin 中将最小 100 放在步进器类上不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36464771/

相关文章:

c# - mscorlib.dll 中出现“System.ArgumentOutOfRangeException”

c# - 在 c# 中执行此操作的最佳 OOP 模式是什么

c# - 纯粹在 xaml 中连接文字和静态资源字符串

c# - 在 C# 中使用类型作为函数参数创建通用对象

c# - System.ArgumentException : „Column does not belong to table .” - 如何修复此错误(将数据从 csv 文件导入到 mysql 数据库)?

c# - ArgumentException:C# 中的 'Illegal characters in path'

c# - 如何检索 xml 节点的值?

c# - 使用 EPPlus 导入 Excel 文件时处理空单元格

xamarin - Xamarin 表单中的模态页面

.net - 单点登录服务器/页面