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

Defines the fluent API for configuring the Kendo UI ScrollView

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ScrollViewBuilder : WidgetBuilderBase<ScrollView, ScrollViewBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<ScrollView, ScrollViewBuilder>ScrollViewBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ToComponent()WidgetBuilderBase<ScrollView, ScrollViewBuilder>.Expression(string)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.Name(string)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.Deferred(bool)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.HtmlAttributes(object)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.Render()WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ToHtmlString()WidgetBuilderBase<ScrollView, ScrollViewBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ToClientTemplate()WidgetBuilderBase<ScrollView, ScrollViewBuilder>.AsModule(bool)WidgetBuilderBase<ScrollView, ScrollViewBuilder>.ComponentWidgetBuilderBase<ScrollView, ScrollViewBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the ScrollViewBuilder class.

C#
public ScrollViewBuilder(ScrollView component)
Parameters:componentScrollView

Methods

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

C#
public ScrollViewBuilder ARIATemplate(string value)
Parameters:valuestring

The value for ARIATemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplate("aria-template")
)

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

C#
public ScrollViewBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the ariatemplate.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

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

C#
public ScrollViewBuilder ARIATemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for ARIATemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplateHandler("template-handler")
)

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

C#
public ScrollViewBuilder ARIATemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for ARIATemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplateId("aria-templateId")
)

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

C#
public ScrollViewBuilder ARIATemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for ARIATemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplateView(new Microsoft.AspNetCore.Html.HtmlString("Viewing item #: data.Text # out of #: data.Total #"))
)

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

C#
public ScrollViewBuilder AutoBind(bool value)
Parameters:valuebool

The value for AutoBind

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.AutoBind(true)
)

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 ScrollViewBuilder BounceVelocityThreshold(double value)
Parameters:valuedouble

The value for BounceVelocityThreshold

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.BounceVelocityThreshold(20)
)

The height of the ScrollView content.

C#
public ScrollViewBuilder ContentHeight(int value)
Parameters:valueint

The value that configures the content height.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

The height of the ScrollView content.

C#
public ScrollViewBuilder ContentHeight(string value)
Parameters:valuestring

The value for ContentHeight

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ContentHeight(20)
)

Configure the DataSource of the component

C#
public ScrollViewBuilder DataSource(Action<DataSourceBuilder<object>> configurator)
Parameters:configuratorAction<DataSourceBuilder<object>>

The DataSourceBuilder<TModel> that configures the DataSource of the component.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Sets the ID of the DataSource that will be used by the ScrollView.

C#
public ScrollViewBuilder DataSource(string dataSourceId)
Parameters:dataSourceIdstring

The name of the DataSource.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

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

C#
public ScrollViewBuilder Duration(double value)
Parameters:valuedouble

The value for Duration

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Duration(20)
)

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

C#
public ScrollViewBuilder EmptyTemplate(string value)
Parameters:valuestring

The value for EmptyTemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplate("empty-template")
)

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

C#
public ScrollViewBuilder EmptyTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the emptytemplate.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

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

C#
public ScrollViewBuilder EmptyTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for EmptyTemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplateHandler("emptyTemplateHandler")
)

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

C#
public ScrollViewBuilder EmptyTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for EmptyTemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplateId("empty-templateId")
)

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

C#
public ScrollViewBuilder EmptyTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for EmptyTemplate

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplateView(new Microsoft.AspNetCore.Html.HtmlString("empty-template-view"))
)

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

C#
public ScrollViewBuilder EnablePager(bool value)
Parameters:valuebool

The value for EnablePager

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EnablePager(false)
)

Configures the client-side events.

C#
public ScrollViewBuilder Events(Action<ScrollViewEventBuilder> configurator)
Parameters:configuratorAction<ScrollViewEventBuilder>

The client events action.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("ScrollView")
.Events(events =&gt; events
.Change("onChange")
)
)

Defines the items in the scrollview

C#
public ScrollViewBuilder Items(Action<ScrollViewItemFactory> addAction)
Parameters:addActionAction<ScrollViewItemFactory>

The add action.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Defines the messages that are set as aria-lables for the previous and next buttons.

C#
public ScrollViewBuilder Messages(Action<ScrollViewMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<ScrollViewMessagesSettingsBuilder>

The ScrollViewMessagesSettingsBuilder for the messages setting.

Returns:

ScrollViewBuilder

Returns the current instance of ScrollViewBuilder .

If set to true enables the built-in keyboard navigation

C#
public ScrollViewBuilder Navigatable()
Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

If set to true enables the built-in keyboard navigation

C#
public ScrollViewBuilder Navigatable(bool value)
Parameters:valuebool

The value for Navigatable

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Navigatable()
)

The initial page that will be displayed.

C#
public ScrollViewBuilder Page(double value)
Parameters:valuedouble

The value for Page

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Page(20)
)

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

C#
public ScrollViewBuilder Pageable()
Returns:

ScrollViewBuilder

Returns the current instance of ScrollViewPageableSettingsBuilder .

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

C#
public ScrollViewBuilder Pageable(Action<ScrollViewPageableSettingsBuilder> configurator)
Parameters:configuratorAction<ScrollViewPageableSettingsBuilder>

The ScrollViewPageableSettingsBuilder for the pageable setting.

Returns:

ScrollViewBuilder

Returns the current instance of ScrollViewBuilder .

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

C#
public ScrollViewBuilder Pageable(bool enabled)
Parameters:enabledbool

Enables or disables the pageable option.

Returns:

ScrollViewBuilder

Returns the current instance of ScrollViewPageableSettingsBuilder .

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 ScrollViewBuilder PagerOverlay(string value)
Parameters:valuestring

The value for PagerOverlay

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.PagerOverlay("page-overlay")
)

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

C#
public ScrollViewBuilder Template(string value)
Parameters:valuestring

The value for Template

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Template("template")
)

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

C#
public ScrollViewBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

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

C#
public ScrollViewBuilder TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.TemplateHandler("template-handler")
)

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

C#
public ScrollViewBuilder TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.TemplateId("templateId")
)

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

C#
public ScrollViewBuilder TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.TemplateView(new Microsoft.AspNetCore.Html.HtmlString("empty-template-view"))
)

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 ScrollViewBuilder VelocityThreshold(double value)
Parameters:valuedouble

The value for VelocityThreshold

Returns:

ScrollViewBuilder

Returns the current ScrollViewBuilder instance.

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.VelocityThreshold(20)
)