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

Defines the fluent API for configuring the Kendo UI Tooltip

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TBuilder

Syntax:

C#
public class TooltipBuilderBase<TBuilder> : WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>, IHtmlContent where TBuilder : TooltipBuilderBase<TBuilder>

Inheritance: objectHelperResultWidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>TooltipBuilderBase<TBuilder>

Derived Classes: MapMarkerTooltipBuilderTooltipBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ToComponent()WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.Expression(string)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.Explorer(ModelExplorer)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.Name(string)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.Deferred(bool)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.HtmlAttributes(object)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ScriptAttributes(object, bool)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.Render()WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ToHtmlString()WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ToClientTemplate()WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.AsModule(bool)WidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.ComponentWidgetBuilderBase<Tooltip, TooltipBuilderBase<TBuilder>>.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 TooltipBuilderBase<TBuilder> class.

C#
public TooltipBuilderBase(Tooltip component)
Parameters:componentTooltip

Methods

Configures the animation effects of the panelbar.

C#
public TBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action that configures the animation.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Animation(animation =&gt; animation.Expand))

Configures the animation effects of the window.

C#
public TBuilder Animation(bool enable)
Parameters:enablebool

Whether the component animation is enabled.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Animation(false))

Specifies if the Tooltip will be hidden when mouse leaves the target element. If set to false a close button will be shown within Tooltip. If set to false, showAfter is specified and the showOn is set to "mouseenter" the Tooltip will be displayed after the given timeout even if the element is no longer hovered.

C#
public TBuilder AutoHide(bool value)
Parameters:valuebool

The value for AutoHide

Returns:

TBuilder

Specifies if the Tooltip callout will be displayed.

C#
public TBuilder Callout(bool value)
Parameters:valuebool

The value for Callout

Returns:

TBuilder

Sets the HTML content which the tooltip should display as a string.

C#
public TBuilder Content(string value)
Parameters:valuestring

The action which renders the content.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Content("&lt;strong&gt; First Item Content&lt;/strong&gt;")
)

Sets the HTML content which the tooltip should display as a string via TemplateBuilder<TModel>.

C#
public TBuilder Content<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The TemplateBuilder<TModel> instance.

Returns:

TBuilder

Returns the current TBuilder instance.

Sets JavaScript function which to return the content for the tooltip.

C#
public TBuilder ContentHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>Returns:

TBuilder

Returns the current TBuilder instance.

Sets JavaScript function which to return the content for the tooltip.

C#
public TBuilder ContentHandler(string handler)
Parameters:handlerstring

JavaScript function name

Returns:

TBuilder

Returns the current TBuilder instance.

Sets the id of kendo template which will be used as tooltip content.

C#
public TBuilder ContentTemplateId(string value)
Parameters:valuestring

The id of the template

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Content("template")
)

Configures the client-side events.

C#
public TBuilder Events(Action<TooltipEventBuilder> configurator)
Parameters:configuratorAction<TooltipEventBuilder>

The client events action.

Returns:

TBuilder

Example:
C#
@(Html.Kendo().Tooltip()
.Name("Tooltip")
.Events(events =&gt; events
.ContentLoad("onContentLoad")
)
)

Specifies a selector for elements, within the container, for which the Tooltip will be displayed.

C#
public TBuilder Filter(string value)
Parameters:valuestring

The value for Filter

Returns:

TBuilder

The selector which to match the DOM element to which the Tooltip widget will be instantiated

C#
public virtual TBuilder For(string selector)
Parameters:selectorstring

jQuery selector

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@(Html.Kendo().Tooltip()
.For("#element")
)

The height (in pixels) of the Tooltip.

C#
public TBuilder Height(double value)
Parameters:valuedouble

The value for Height

Returns:

TBuilder

Explicitly states whether content iframe should be created.

C#
public TBuilder Iframe(bool value)
Parameters:valuebool

The value for Iframe

Returns:

TBuilder

Sets the Url, which will be requested to return the content.

C#
public TBuilder LoadContentFrom(RouteValueDictionary routeValues)
Parameters:routeValuesRouteValueDictionary

The route values of the Action method.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.LoadContentFrom(MVC.Home.Index().GetRouteValueDictionary());
)

Sets the Url, which will be requested to return the content.

C#
public TBuilder LoadContentFrom(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

The action name.

controllerNamestring

The controller name.

routeValuesobject

Route values.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.LoadContentFrom("AjaxView_OpenSource", "Tooltip", new { id = 10})
)

Define the endpoint that will return HTML content that can be loaded in the content area of the Tooltip.

C#
public TBuilder LoadContentFrom(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestringcontrollerNamestringrouteValuesRouteValueDictionaryReturns:

TBuilder

Returns the current TBuilder instance.

Sets the Url, which will be requested to return the content.

C#
public TBuilder LoadContentFrom(string actionName, string controllerName)
Parameters:actionNamestring

The action name.

controllerNamestring

The controller name.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.LoadContentFrom("AjaxView_OpenSource", "Tooltip")
)

Sets the Url, which will be requested to return the content.

C#
public TBuilder LoadContentFrom(string value)
Parameters:valuestring

The url.

Returns:

TBuilder

Returns the current TBuilder instance.

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.LoadContentFrom(Url.Action("AjaxView_OpenSource", "Tooltip"))
)

Name method.

C#
protected TBuilder Name(string componentName)
Parameters:componentNamestringReturns:

TBuilder

Represents the tooltip position.

C#
public TBuilder Position(TooltipPosition value)
Parameters:valueTooltipPosition

The value for Position

Returns:

TBuilder

Specify the delay in milliseconds before the Tooltip is shown. This option is ignored if showOn is set to "click" or "focus".

C#
public TBuilder ShowAfter(double value)
Parameters:valuedouble

The value for ShowAfter

Returns:

TBuilder

Represents the tooltip position.

C#
public TBuilder ShowOn(TooltipShowOnEvent value)
Parameters:valueTooltipShowOnEvent

The value for ShowOn

Returns:

TBuilder

The width (in pixels) of the Tooltip.

C#
public TBuilder Width(double value)
Parameters:valuedouble

The value for Width

Returns:

TBuilder