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

Defines the fluent interface for configuring the Tooltip component.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TBuilder

Syntax:

C#
public class TooltipSettingsBuilder<TBuilder> where TBuilder : TooltipSettingsBuilder<TBuilder>

Inheritance: objectTooltipSettingsBuilder<TBuilder>

Derived Classes: MapMarkerTooltipBuilderTooltipBuilder

Inherited Members object.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 TooltipSettingsBuilder<TBuilder> class.

C#
public TooltipSettingsBuilder(Tooltip component)
Parameters:componentTooltip

The component.

Properties

C#
protected Tooltip Component { get; set; }

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

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

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

Determines if tooltip should be automatically hidden, or a close button should be present

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

Specifies if the Tooltip will be hidden when the mouse leaves the target element.

Returns:

TBuilder

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

Determines if callout should be visible

C#
public virtual TBuilder Callout(bool show)
Parameters:showbool

Specifies if the Tooltip callout will be displayed.

Returns:

TBuilder

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

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

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Content("&lt;strong&gt; First Item Content&lt;/strong&gt;")
)
C#
public TBuilder Content<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>Returns:

TBuilder

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

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

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

JavaScript function name

Returns:

TBuilder

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

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

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

C#
public TBuilder ContentTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The id of the template

Returns:

TBuilder

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

Configures the client events.

C#
public TBuilder Events(Action<TooltipEventBuilder> clientEventsAction)
Parameters:clientEventsActionAction<TooltipEventBuilder>

The action that configures the client events.

Returns:

TBuilder

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Events(events =&gt; events.Hide("onHide").Show("onShow"))
)

Sets the height of the tooltip.

C#
public TBuilder Height(int height)
Parameters:heightint

The height (in pixels) of the Tooltip.

Returns:

TBuilder

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.Height(100)
)
C#
public virtual TBuilder HideAfter(int milliseconds)
Parameters:millisecondsintReturns:

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

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

Example:
C#
@( Html.Kendo().Tooltip()
.For("#element")
.LoadContentFrom("AjaxView_OpenSource", "Tooltip", new { id = 10})
)
C#
public TBuilder LoadContentFrom(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestringcontrollerNamestringrouteValuesRouteValueDictionaryReturns:

TBuilder

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

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

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

Specifies the offset in pixels between the Tooltip and the anchor.

C#
public virtual TBuilder Offset(int offset)
Parameters:offsetint

Specifies the offset (in pixels) between the Tooltip and the anchor.

Returns:

TBuilder

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

The position (relative to the target) at which the Tooltip will be shown

C#
public virtual TBuilder Position(TooltipPosition position)
Parameters:positionTooltipPosition

The position that is relative to the target element at which the Tooltip will be shown.

Returns:

TBuilder

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

The inverval in milliseconds, after which the Tooltip will be shown

C#
public virtual TBuilder ShowAfter(int milliseconds)
Parameters:millisecondsint

Specifies the delay (in milliseconds) before the Tooltip shows. This option is ignored if showOn is set to click or focus.

Returns:

TBuilder

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

The event on which the Tooltip will be shown

C#
public virtual TBuilder ShowOn(TooltipShowOnEvent eventName)
Parameters:eventNameTooltipShowOnEvent

The event on which the Tooltip will be shown.

Returns:

TBuilder

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

The interval in milliseconds, after which the Tooltip will be hidden

C#
public virtual TBuilder ThemeColor(TooltipThemeColor value)
Parameters:valueTooltipThemeColorReturns:

TBuilder

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

Sets the width of the tooltip.

C#
public TBuilder Width(int width)
Parameters:widthint

The width (in pixels) of the Tooltip.

Returns:

TBuilder

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