DraggableTagHelper
Kendo UI Draggable TagHelper DraggableTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("body", Attributes = "kendo-draggable")]
[HtmlTargetElement("div", Attributes = "kendo-draggable")]
[HtmlTargetElement("form", Attributes = "kendo-draggable")]
[HtmlTargetElement("ul", Attributes = "kendo-draggable")]
[HtmlTargetElement("ol", Attributes = "kendo-draggable")]
[HtmlTargetElement("p", Attributes = "kendo-draggable")]
[HtmlTargetElement("a", Attributes = "kendo-draggable")]
[HtmlTargetElement("table", Attributes = "kendo-draggable")]
[HtmlTargetElement("nav", Attributes = "kendo-draggable")]
public class DraggableTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseDraggableTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<div kendo-draggable="true" name="draggable" kendo-auto-scroll="true"></div>
Constructors
Initializes a new instance of the DraggableTagHelper class.
Properties
If set to true the widget will auto-scroll the container when the mouse/finger is close to the top/bottom of it.
[HtmlAttributeName("kendo-auto-scroll")]
public bool? AutoScroll { get; set; }
Represents the Draggable widget Axis
[HtmlAttributeName("kendo-axis")]
public DraggableAxis? Axis { get; set; }
Selector that determines the container to which boundaries the hint movement will be constrained.
[HtmlAttributeName("kendo-container")]
public string Container { get; set; }
Specifies the offset of the hint relative to the mouse cursor/finger. By default, the hint is initially positioned on top of the draggable source offset.
[HtmlAttributeName("kendo-cursor-offset-left")]
public double? CursorOffsetLeft { get; set; }
Specifies the offset of the hint relative to the mouse cursor/finger. By default, the hint is initially positioned on top of the draggable source offset.
[HtmlAttributeName("kendo-cursor-offset-top")]
public double? CursorOffsetTop { get; set; }
The required distance that the mouse should travel in order to initiate a drag.
[HtmlAttributeName("kendo-distance")]
public double? Distance { get; set; }
Selects child elements that are draggable if a widget is attached to a container.
[HtmlAttributeName("kendo-filter")]
public string Filter { get; set; }
Used to group sets of draggable and drop targets. A draggable with the same group value as a drop target will be accepted by the drop target.
[HtmlAttributeName("kendo-group")]
public string Group { get; set; }
Provides a way for customization of the drag indicator. If a function is supplied, it receives one argument - the draggable element's jQuery object.
[HtmlAttributeName("kendo-hint")]
public string Hint { get; set; }
Suitable for touch oriented user interface, in order to avoid collision with the touch scrolling gesture. When set to true, the widget will be activated after the user taps and holds the finger on the element for a short amount of time.The draggable will also be activated by pressing, holding and lifting the finger without any movement. Dragging it afterwards will initiate the drag immediately. The activated mode can be canceled by calling cancelHold.
[HtmlAttributeName("kendo-hold-to-drag")]
public bool? HoldToDrag { get; set; }
Specifies child elements for which the drag will not be initialized. Useful if the draggable contains input elements.
[HtmlAttributeName("kendo-ignore")]
public string Ignore { get; set; }
Attribute initializator for the Kendo Draggable.
[HtmlAttributeName("kendo-draggable")]
public bool? IsEnabled { get; set; }
Fired while dragging. The drag event represents a jQuery mousemove event and contains all the event data of the jQuery Event Object.
[HtmlAttributeName("on-kendo-drag")]
public string OnDrag { get; set; }
Fired when item drag is canceled by pressing the Escape key. The dragcancel event represents a jQuery keyup event and contains all the event data of the jQuery Event Object.
[HtmlAttributeName("on-kendo-dragcancel")]
public string OnDragcancel { get; set; }
Fired when item drag ends. The dragend event represents a jQuery mouseup event and contains all the event data of the jQuery Event Object.
[HtmlAttributeName("on-kendo-dragend")]
public string OnDragend { get; set; }
Fired when item drag starts. The dragstart event represents a jQuery mousedown event and contains all the event data of the jQuery Event Object.
[HtmlAttributeName("on-kendo-dragstart")]
public string OnDragstart { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: