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

Defines the fluent API for configuring the Kendo UI Popover

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class PopoverBuilder : WidgetBuilderBase<Popover, PopoverBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<Popover, PopoverBuilder>PopoverBuilder

Implements: IHtmlContent

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

C#
public PopoverBuilder(Popover component)
Parameters:componentPopover

Methods

An array of the action buttons

C#
public PopoverBuilder Actions(Action<PopoverActionFactory> configurator)
Parameters:configuratorAction<PopoverActionFactory>

The PopoverActionFactory for the actions setting.

Returns:

PopoverBuilder

Returns the current instance of PopoverBuilder .

Defines how the actions buttons will be positioned

C#
public PopoverBuilder ActionsLayout(PopoverActionsLayout value)
Parameters:valuePopoverActionsLayout

The value for ActionsLayout

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.ActionsLayout(PopoverActionsLayout.Center)
)

Configures the animation effects of the popover.

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

Configuration parameter for setting the Animation.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Animation(a =&gt; a.Enable(true))
)

Configures the animation effects of the popover.

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

Boolean parameter for setting the Animation configuration.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Animation(true)
)

Defines a kendo template that will be used as the card body inside the popover component.

C#
public PopoverBuilder Body(string value)
Parameters:valuestring

The value for Body

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Sets the content of the popover body.

C#
public PopoverBuilder Body<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The TemplateBuilder<TModel> for the popover body.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Defines a kendo template that will be used as the card body inside the popover component.

C#
public PopoverBuilder BodyHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Defines a kendo template that will be used as the card body inside the popover component.

C#
public PopoverBuilder BodyHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Configures the client-side events.

C#
public PopoverBuilder Events(Action<PopoverEventBuilder> configurator)
Parameters:configuratorAction<PopoverEventBuilder>

The client events action.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.Name("Popover")
.Events(events =&gt; events
.Show("onShow")
)
)

Specifies a selector for the elements within the container which will display the Popover.

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

The value for Filter

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

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

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

jQuery selector

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
)

Defines a kendo template that will be used as the card header inside the popover component.

C#
public PopoverBuilder Header(string value)
Parameters:valuestring

The value for Header

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Defines a kendo template that will be used as the card header inside the popover component.

C#
public PopoverBuilder HeaderHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Defines a kendo template that will be used as the card header inside the popover component.

C#
public PopoverBuilder HeaderHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

The height (in pixels) of the Popover.

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

The value for Height

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Height(120)
)

Specifies the offset (in pixels) between the Popover and the anchor. The offset is rendered from the callout arrow.

C#
public PopoverBuilder Offset(double value)
Parameters:valuedouble

The value for Offset

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Offset(120)
)

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

C#
public PopoverBuilder Position(PopoverPosition value)
Parameters:valuePopoverPosition

The value for Position

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Center)
)

Defines when the Popover will be shown.

C#
public PopoverBuilder ShowOn(PopoverShowOn value)
Parameters:valuePopoverShowOn

The value for ShowOn

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.ShowOn(PopoverShowOn.Click)
)

Defines a value indicating whether the popover will show/hide only when clicking on the target element.

C#
public PopoverBuilder ToggleOnClick()
Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Defines a value indicating whether the popover will show/hide only when clicking on the target element.

C#
public PopoverBuilder ToggleOnClick(bool value)
Parameters:valuebool

The value for ToggleOnClick

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.ShowOn(PopoverShowOn.Click)
.ToggleOnClick(true)
)

The width (in pixels) of the Popover.

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

The value for Width

Returns:

PopoverBuilder

Returns the current PopoverBuilder instance.

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Width(120)
)