Collapsible

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders a content that can be shown and hidden.

Usage & Scenarios

A Bootstrap collapse element.

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

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;

}

Properties

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

HTML produced by the control