New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI ScrollView TagHelper ScrollViewTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-scrollview")]
[RestrictChildren("items", new string[] { "datasource", "messages", "pageable", "aria-template", "empty-template", "item-template" })]
[OutputElementHint("div")]
public class ScrollViewTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<DataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseScrollViewTagHelper

Implements: IDataBoundWidget<DataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-scrollview name="scrollView">
       <items>
           <scrollview-item>
               <content>
                   <h1>One</h1>
               </content>
           </scrollview-item>
           <scrollview-item>
               <content>
                   <h1>Two</h1>
               </content>
           </scrollview-item>
           <scrollview-item>
               <content>
                   <h1>Three</h1>
               </content>
           </scrollview-item>
       </items>
   </kendo-scrollview>

Constructors

Initializes a new instance of the ScrollViewTagHelper class.

C#
public ScrollViewTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

Specifies a template is used to populate an aria-live element that anounces which is the current item.

C#
public string ARIATemplate { get; set; }

Specifies a template is used to populate an aria-live element that anounces which is the current item. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string ARIATemplateHandler { get; set; }

Specifies a template is used to populate an aria-live element that anounces which is the current item. This option expects the ID of the script element that contains the template.

C#
public string ARIATemplateId { get; set; }

Specifies a template is used to populate an aria-live element that anounces which is the current item. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent ARIATemplateView { get; set; }

If set to false the widget will not bind to the DataSource during initialization.

C#
public bool? AutoBind { get; set; }

The intensity of the swipe after which the swipe will result in a bounce effect when the user scrolls to the next page. Higher values require more accelerative swipe to notice the bounce effect when a page is changed.

C#
public double? BounceVelocityThreshold { get; set; }

The height of the ScrollView content. Supports 100% if the ScrollView container element does have set height. Each page will be streched to fill the container height.

C#
public string ContentHeight { get; set; }

The Id of the data source.

C#
public string DatasourceId { get; set; }

The duration (in milliseconds) for the ScrollView to snap to the current page after the user releases it.

C#
public double? Duration { get; set; }

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

C#
public string EmptyTemplate { get; set; }

The template for rendering the pages without content. By default, the ScrollView renders a blank page. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string EmptyTemplateHandler { get; set; }

The template for rendering the pages without content. By default, the ScrollView renders a blank page. This option expects the ID of the script element that contains the template.

C#
public string EmptyTemplateId { get; set; }

The template for rendering the pages without content. By default, the ScrollView renders a blank page. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent EmptyTemplateView { get; set; }

If set to true, the ScrollView will display a pager. By default, the pager is enabled.

C#
public bool? EnablePager { get; set; }

If set to true enables the built-in keyboard navigation

C#
public bool? Navigatable { get; set; }

The name of the JavaScript function that will handle the change event. Fires when the ScrollView page is changed.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the ScrollView is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the refresh event. Fires when the ScrollView refreshes.

C#
public string OnRefresh { get; set; }

The initial page that will be displayed.

C#
public double? Page { get; set; }

Sets an overlay background color for the pager. It can be configured to one of the three possible values: - none - no background overlay is set - dark - sets a dark-colored background overlay - light - sets a light-colored background overlay

C#
public string PagerOverlay { get; set; }

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

C#
public string Template { get; set; }

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

The length of the horizontal swipe after which a swipe will navigate to the next page - as opposed to snapping back to the current page. Higher values require long area swipes to navigate to the next page.

C#
public double? VelocityThreshold { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)