Loading...
Loading...
Compare original and translation side by side
<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
<Grid>
<!-- Basic TimeSpanEdit -->
<syncfusion:TimeSpanEdit
x:Name="timeSpanEdit"
Value="5.12:30:45"
Width="150"
Height="30" />
</Grid>
</Window>using Syncfusion.Windows.Shared;
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
// Create and configure TimeSpanEdit
TimeSpanEdit editor = new TimeSpanEdit();
editor.Value = new TimeSpan(5, 12, 30, 45);
editor.Width = 150;
editor.Height = 30;
this.Content = editor;
}
}Syncfusion.Shared.WPF<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
<Grid>
<!-- Basic TimeSpanEdit -->
<syncfusion:TimeSpanEdit
x:Name="timeSpanEdit"
Value="5.12:30:45"
Width="150"
Height="30" />
</Grid>
</Window>using Syncfusion.Windows.Shared;
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
// Create and configure TimeSpanEdit
TimeSpanEdit editor = new TimeSpanEdit();
editor.Value = new TimeSpan(5, 12, 30, 45);
editor.Width = 150;
editor.Height = 30;
this.Content = editor;
}
}Syncfusion.Shared.WPF<syncfusion:TimeSpanEdit
Value="5.08:30:00"
MinValue="2.00:00:00"
MaxValue="10.00:00:00"
ShowArrowButtons="True" /><syncfusion:TimeSpanEdit
Value="5.08:30:00"
MinValue="2.00:00:00"
MaxValue="10.00:00:00"
ShowArrowButtons="True" /><syncfusion:TimeSpanEdit
Value="3.14:25:30"
Format="d 'days' h 'hours' m 'minutes' s 'seconds'" /><syncfusion:TimeSpanEdit
Value="3.14:25:30"
Format="d 'days' h 'hours' m 'minutes' s 'seconds'" /><syncfusion:TimeSpanEdit
Value="5.10:00:00"
StepInterval="1.00:15:30"
IncrementOnScrolling="True" /><syncfusion:TimeSpanEdit
Value="5.10:00:00"
StepInterval="1.00:15:30"
IncrementOnScrolling="True" /><syncfusion:TimeSpanEdit
Value="7.18:45:30"
IsReadOnly="True"
AllowNull="False" /><syncfusion:TimeSpanEdit
Value="7.18:45:30"
IsReadOnly="True"
AllowNull="False" /><syncfusion:TimeSpanEdit
AllowNull="True"
Value="{x:Null}"
NullString="Enter time duration..." /><syncfusion:TimeSpanEdit
AllowNull="True"
Value="{x:Null}"
NullString="Enter time duration..." />| Property | Type | Default | Purpose |
|---|---|---|---|
| | | The time duration to display/edit |
| | | Custom format string (d=days, h=hours, m=minutes, s=seconds, z=milliseconds) |
| | — | Minimum allowed time duration |
| | — | Maximum allowed time duration |
| | | Increment/decrement interval for buttons/wheel/keyboard |
| | | Allow null/empty values |
| | | Watermark text when value is null |
| | | Show up/down spinner buttons |
| | | Allow mouse wheel to change values |
| | | Allow click & drag to change values |
| | | Prevent user edits (read-only mode) |
| | | Control background color |
| | | Text color |
| | | Selection highlight color |
| | | RTL support (RightToLeft) |
| 属性 | 类型 | 默认值 | 用途 |
|---|---|---|---|
| | | 要显示/编辑的时长 |
| | | 自定义格式字符串(d=天, h=时, m=分, s=秒, z=毫秒) |
| | — | 允许的最小时长 |
| | — | 允许的最大时长 |
| | | 按钮/滚轮/键盘的增减间隔 |
| | | 是否允许空值 |
| | | 值为空时的水印文本 |
| | | 是否显示上下调节按钮 |
| | | 是否允许通过鼠标滚轮修改数值 |
| | | 是否允许点击拖拽修改数值 |
| | | 是否禁止用户编辑(只读模式) |
| | | 控件背景色 |
| | | 文本颜色 |
| | | 选中高亮色 |
| | | RTL支持(RightToLeft) |
"d 'days' h 'hrs' m 'min'"IsReadOnly="True"ShowArrowButtons="False"StepInterval