Version:
1.0 | 1.1 | 2.0

RouteLink

in namespace DotVVM.Framework.Controls.Bootstrap

Extends the builtin RouteLink control to allow applying Bootstrap CSS classes to the link.

Properties

Name Type Description Notes Default Value
property icon Attributes Dictionary<String,Object>
attribute
inner element
static value
bindable
default
property icon ClientIDMode ClientIDMode Gets or sets the client ID generation algorithm.
attribute
inner element
static value
bindable
default
Static
property icon DataContext Object Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value.
attribute
inner element
static value
bindable
default
property icon Enabled Boolean
attribute
inner element
static value
bindable
default
True
property icon ID String Gets or sets the unique control ID.
attribute
inner element
static value
bindable
default
property icon InnerText String Gets or sets the inner text of the HTML element.
attribute
inner element
static value
bindable
default
property icon RouteName String Gets or sets the name of the route in the route table.
attribute
inner element
static value
bindable
default
property icon Size Size Gets or sets the size of the button.
attribute
inner element
static value
bindable
default
Default
property icon Text String Gets or sets the text of the hyperlink.
attribute
inner element
static value
bindable
default
property icon Type BootstrapColor Gets or sets the color of the button.
attribute
inner element
static value
bindable
default
Default
property icon UrlSuffix String Gets or sets the suffix that will be appended to the generated URL (e.g. query string or URL fragment).
attribute
inner element
static value
bindable
default
property icon Visible Boolean Gets or sets whether the control is visible.
attribute
inner element
static value
bindable
default
True

Events

Name Type Description

Usage & Scenarios

Extends the builtin RouteLink control to allow using Bootstrap button CSS classes.

https://getbootstrap.com/docs/3.3/css/#buttons

HTML Rendered by the Control

Sample 1: RouteLink Sizing

Use the Size property to set the size of the button.

<bs:RouteLink RouteName="RouteLink_sample1" 
              Text="Button" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Button" 
           Size="Large" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Button" 
           Size="Small" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Button" 
           Size="ExtraSmall" />
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.bootstrap.Button.sample1
{
    public class ViewModel : DotvvmViewModelBase
    {

        public void DoSomething()
        {
        }
    }
}

Sample 2: RouteLink Types

The Type property specifies the color of the button (using standard Bootstrap classes).

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Default"
           Type="Default" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Primary"
           Type="Primary" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Success"
           Type="Success" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Info"
           Type="Info" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Warning"
           Type="Warning" />

<bs:RouteLink RouteName="RouteLink_sample1"
           Text="Danger"
           Type="Danger" />
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.bootstrap.Button.sample2
{
    public class ViewModel : DotvvmViewModelBase
    {

        public void DoSomething()
        {
        }
    }
}

Suggestions

Help & Contribute

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

Edit on Github

Send message