【问题标题】:Telerik UI For UWP TimePicker Step propertyTelerik UI For UWP TimePicker Step 属性
【发布时间】:2019-02-07 14:02:22
【问题描述】:

我正在尝试在 RadTimePicker 上设置从 1 到 5 的分钟增量。 Telerik 文档在这里:

https://docs.telerik.com/devtools/universal-windows-platform/controls/raddatepicker-and-radtimepicker/properties-and-configuration/raddatetimepickers-properties-pickerproperties

这么说

Step (DateTimeOffset): Gets or sets the step that will be applied to the picker date/time lists. Each list will take the correspomding component fron the DateTimeOffset structure.

没有示例代码,我不知道这意味着什么或如何做,但我已经尝试过:

   InitializeComponent();
   var t = new DateTimeOffset();
   t.AddMinutes(5);
   timePickerz.Step = t;

在代码后面但是不行。

【问题讨论】:

    标签: xaml uwp telerik


    【解决方案1】:

    我测试了我这边的RadTimePicker控件,没有问题。例如,如果我将Step 设置为 6 分钟,则分钟选择器将步进 6 分钟。

    RadTimePicker myTimePicker = new RadTimePicker();
    myTimePicker.DisplayMode = DateTimePickerDisplayMode.Standard;
    myTimePicker.Step = new DateTimeOffset().AddMinutes(6);
    

    【讨论】:

      猜你喜欢
      • 2019-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-12
      相关资源
      最近更新 更多