Наследование: BootstrapComponents.Core.GenericInnerHtmlContainer
Пример #1
0
 public void DisabledHyperlink()
 {
     var button = new Button("Disabled", new ButtonSettings { Tag = ButtonSettings.ButtonTag.A, IsDisabled = true });
     Assert.AreEqual("<a class=\"btn btn-default disabled\" href=\"#\">Disabled</a>", button.ToHtmlString());
 }
Пример #2
0
 public void HyperlinkButton()
 {
     var button = new Button("GitHub", new ButtonSettings { LinkUrl = "http://www.github.com"});
     Assert.AreEqual("<a class=\"btn btn-default\" href=\"http://www.github.com\">GitHub</a>", button.ToHtmlString());
 }
Пример #3
0
 public void DefaultButton()
 {
     var button = new Button("Test Button");
     Assert.AreEqual("<button class=\"btn btn-default\">Test Button</button>", button.ToHtmlString());
 }
Пример #4
0
 public void DisabledButton()
 {
     var button = new Button("Disabled", new ButtonSettings { IsDisabled = true });
     Assert.AreEqual("<button class=\"btn btn-default\" disabled=\"disabled\">Disabled</button>", button.ToHtmlString());
 }
Пример #5
0
 public void ButtonWithSize()
 {
     var button = new Button("Extra Small Button", new ButtonSettings { Size = Size.Xs });
     Assert.AreEqual("<button class=\"btn btn-default btn-xs\">Extra Small Button</button>", button.ToHtmlString());
 }
Пример #6
0
 public void ButtonWithCategory()
 {
     var button = new Button("Info Button", new ButtonSettings { Category = Category.Info });
     Assert.AreEqual("<button class=\"btn btn-info\">Info Button</button>", button.ToHtmlString());
 }
Пример #7
0
 public void ButtonPullRight()
 {
     var button = new Button("Button").PullRight();
     Assert.AreEqual("<button class=\"btn btn-default pull-right\">Button</button>", button.ToHtmlString());
 }
Пример #8
0
 public void BlockLevelButton()
 {
     var button = new Button("Block Level", new ButtonSettings { BlockLevel = true });
     Assert.AreEqual("<button class=\"btn btn-default btn-block\">Block Level</button>", button.ToHtmlString());
 }
Пример #9
0
 public Button Button(string text, ButtonSettings settings = null)
 {
     var button = new Button(text, settings);
     button.Attrs["class"] += "navbar-btn";
     return button;
 }