Version: 2.0 |

Collapsible

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders a content that can be shown and hidden.

Properties

Name Type Description Notes Default Value
IsCollapsed Boolean Gets or sets whether the content is collapsed or not.
attribute
inner element
static value
bindable
default
True

Events

Name Type Description

Usage & Scenarios

A Bootstrap collapse element.

https://getbootstrap.com/docs/4.1/components/collapse/

HTML Rendered by the Control

Sample 1: Basic Collapsible

Put the collapsible content inside the control.

The IsCollapsed property specifies whether the content is collapsed or expanded. The easiest way to expand or collapse is to use a link or button and switch the property using Static Command Binding.

<dot:LinkButton Click="{staticCommand: IsCollapsed = !IsCollapsed}" Text="Expand or collapse" />

<bs:Collapsible IsCollapsed="{value: IsCollapsed}">
  Collapsible content
</bs:Collapsible>
public class ViewModel
{
    public bool IsCollapsed { get; set; } = true;

}

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message