Exemplo n.º 1
0
        public static Elements.Dropdown.Option Generate(string value, string text, bool isSelected)
        {
            var newOptionElementInstance = new Elements.Dropdown.Option(value: value, text: text, isSelected: isSelected);

            newOptionElementInstance.Rendered = GenerateOptionBody(option: newOptionElementInstance);

            return(newOptionElementInstance);
        }
Exemplo n.º 2
0
 public static string GenerateOptionBody(Elements.Dropdown.Option option)
 {
     return($"<option { Extensions.ElementValue(value: option.Value) }{ Extensions.PrintSelectedElementAttribute(option.IsSelected) }>{ option.Text }</option>");
 }