Gets or sets the snap unit.
Namespace: MindFusion.Scheduling.Wpf
Assembly: MindFusion.Scheduling.Wpf
SyntaxC#
Copy Code
|
|---|
public TimeUnit SnapUnit { get; set; } |
Visual Basic
Copy Code
|
|---|
Public Property SnapUnit As TimeUnit |
A member of the TimeUnit enumeration.
RemarksThis property works in conjunction with SnapUnitCount when EnableSnapping is set to true. These properties specify a virtual grid to which the items are aligned when modified interactively. If custom snapping is disabled, the items are aligned to the cells of the view.
To completely disable snapping, specify custom snapping with very small resolution - for example, one second.
ExampleThe following example disables snapping:
C#
Copy Code
|
|---|
| calendar.ResourceViewSettings.EnableSnapping = true; calendar.ResourceViewSettings.SnapUnit = TimeUnit.Second; calendar.ResourceViewSettings.SnapUnitCount = 1; |
Visual Basic
Copy Code
|
|---|
| calendar.ResourceViewSettings.EnableSnapping = True calendar.ResourceViewSettings.SnapUnit = TimeUnit.Second calendar.ResourceViewSettings.SnapUnitCount = 1 |
See Also