WinRT界面控件Essential Studio上如何选择时间范围
本文主要说明如何在界面控件Essential Studio for WinRT(XAML)中如何实现时间范围选择,要实现这个可以参考下面的步骤:
1、从项目中打开“添加引用”窗口。
2、选择“窗口”> “扩展”> Syncfusion controls for WinRT XAML。
3、在XAML页面添加以下命名空间:
XAML
xmlns:Syncfusion="using:Syncfusion.UI.Xaml.Charts"
4、初始化SfDateTimeRangeNavigator。
XAML
<Syncfusion:SfDateTimeRangeNavigator> </Syncfusion:SfDateTimeRangeNavigator >
设置SfDateTimeRangeNavigator的项目源
在上面的步骤的将会产生一个空的SfDateTimeRangeNavigator控件,而且没有任何的标签,现在需要设置它的项目源和X绑定路径,项目源必须实现IEnumerable接口。
添加内容
需要使用以下属性添加需要在SfDateTimeRangeNavigator中显示的内容。
|
Property |
Description |
|
ItemsSource |
Sets the ItemsSource for SfDateTimeRangeNavigator. |
|
XBindingPath |
Represents the DateTime x values. |
|
Content |
Adds any UI content inside a SfDateTimeRangeNavigator. |
>>设置时间范围代码
效果如下:


浙公网安备 33010602011771号