/// <summary> /// Turns modal to a message box with the specified color. /// </summary> /// <param name="modalBase">The modal instance that this method extends.</param> /// <param name="color">The color of the modal.</param> /// <returns>Current component.</returns> public static ModalBase Message(this ModalBase modalBase, BootstrapColorBase color) { modalBase.AddCssClass("modal-message"); modalBase.AddCssClass(string.Format("{0}-{1}", modalBase.GetBaseClass(), color)); return(modalBase); }
/// <summary> /// Changes the color of the popover title. /// </summary> /// <param name="popover">The popover instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static PopoverBase TitleColor(this PopoverBase popover, BootstrapColorBase color) { var value = popover.GetAttribute("data-titleclass"); value = string.Join(" ", value, color); popover.SetAttribute("data-titleclass", value); return(popover); }
/// <summary> /// Changes the background color of the popover content. /// </summary> /// <param name="popover">The popover instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static PopoverBase ContentBackgroundColor(this PopoverBase popover, BootstrapColorBase color) { var value = popover.GetAttribute("data-titleclass"); value = string.Join(" ", value, string.Format("bg-{0}", color)); popover.SetAttribute("data-class", value); return(popover); }
/// <summary> /// Sets the color of the tab panel. /// </summary> /// <param name="color">The value of color.</param> /// <returns>Current component.</returns> public YimaTabPanel Color(BootstrapColorBase color) { _color = color; if (TitleValue != null) { TitleValue.Color(_color); } if (ContentValue != null) { ContentValue.Color(_color); } return(this); }
/// <summary> /// Sets the color of the tab panel content. /// </summary> /// <param name="tabPanelContentBase">The tab panel content instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static TabPanelContentBase Color(this TabPanelContentBase tabPanelContentBase, BootstrapColorBase color) { tabPanelContentBase.AddCssClass(string.Format("tab-pane-{0}", color)); return(tabPanelContentBase); }
/// <summary> /// Changes the background color of the text box. /// </summary> /// <param name="textBoxBase">The text box instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static FormTextBoxBase Background(this FormTextBoxBase textBoxBase, BootstrapColorBase color) { textBoxBase.AddCssClass(string.Format("bg-{0}", color)); return(textBoxBase); }
/// <summary> /// Sets the color of the switch. /// </summary> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public virtual YimaSwitch Color(BootstrapColorBase color) { AddCssClass(string.Format("switch-{0}", color)); return(this); }
/// <summary> /// Changes the button to a tooltip with the specified value, placement, and color. /// </summary> /// <param name="button">The button instance that this method extends.</param> /// <param name="tooltip">The value of the tooltip.</param> /// <param name="placement">The placement of the tooltip.</param> /// <param name="color">The color of the tooltip.</param> /// <returns>Current component.</returns> public static ButtonBase Tooltip(this ButtonBase button, string tooltip, BootstrapTooltipPlacementType placement, BootstrapColorBase color) { button.AddCssClass(string.Format("tooltip-{0}", color)); button.Tooltip(tooltip, placement); return(button); }
/// <summary> /// Sets the color of the modal header. /// </summary> /// <param name="modalHeaderBase">The modal header instance that this method extends.</param> /// <param name="color">The color of the modal header.</param> /// <returns>Current component.</returns> public static ModalHeaderBase Color(this ModalHeaderBase modalHeaderBase, BootstrapColorBase color) { modalHeaderBase.AddCssClass(string.Format("header-{0}", color)); return(modalHeaderBase); }
/// <summary> /// Sets the color for the check box. /// </summary> /// <param name="formCheckBox">The form check box instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static FormCheckBoxBase Color(this FormCheckBoxBase formCheckBox, BootstrapColorBase color) { formCheckBox.AddCssClass(string.Format("checkbox-{0}", color)); return(formCheckBox); }
/// <summary> /// Sets the color for the radio button. /// </summary> /// <param name="formRadioButton">The form radio button instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static FormRadioButtonBase Color(this FormRadioButtonBase formRadioButton, BootstrapColorBase color) { formRadioButton.AddCssClass(string.Format("radio-{0}", color)); return(formRadioButton); }
/// <summary> /// Changes the color of the bootstrap accordion panel. /// </summary> /// <param name="accordionPanel">The accordion panel instance that this method extends.</param> /// <param name="color">The value of the color.</param> /// <returns>Current component.</returns> public static AccordionPanelBase Color(this AccordionPanelBase accordionPanel, BootstrapColorBase color) { ColorHelper.Color(accordionPanel, color); return(accordionPanel); }