|
| 1 | +--- |
| 2 | +title: Appearance |
| 3 | +page_title: Appearance |
| 4 | +description: "Learn how to customize the appearance of the Telerik UI DropDownButton HtmlHelper for {{ site.framework }}." |
| 5 | +slug: htmlhelpers_dropdownbutton_aspnetcore_appearance |
| 6 | +position: 3 |
| 7 | +--- |
| 8 | + |
| 9 | +# Appearance |
| 10 | + |
| 11 | +In this article, you will find information about the rendering and styling options of the {{ site.product }} DropDownButton. |
| 12 | + |
| 13 | +For general information regarding the rendering, visit the [Components Rendering](https://docs.telerik.com/{{ site.platform }}/styles-and-layout/components-rendering-overview) article. |
| 14 | + |
| 15 | +For a complete example, refer to the [Appearance Demo of the DropDownButton](https://demos.telerik.com/{{ site.platform }}/dropdownbutton/appearance). |
| 16 | + |
| 17 | +## Options |
| 18 | + |
| 19 | +The DropDownButton provides the following methods for styling: |
| 20 | + |
| 21 | +- [`Size()`](#size)—configures the overall size of the component. |
| 22 | +- [`ThemeColor()`](#themecolor)—configures what color will be applied to the component. |
| 23 | +- [`FillMode()`](#fillmode)—defines how the color is applied to the component. |
| 24 | +- [`Rounded()`](#rounded)—determines the border radius of the component. |
| 25 | + |
| 26 | +### Size |
| 27 | + |
| 28 | +To control the size of the DropDownButton, configure the `Size()` method with any of the following values: |
| 29 | + |
| 30 | +- `Small` |
| 31 | +- `Medium` |
| 32 | +- `Large` |
| 33 | +- `None` |
| 34 | + |
| 35 | +The default `Size` value is `Medium`. |
| 36 | + |
| 37 | +```HtmlHelper |
| 38 | + @(Html.Kendo().DropDownButton() |
| 39 | + .Name("DropDownButton") |
| 40 | + .Icon("paste") |
| 41 | + .Size(ComponentSize.Medium) |
| 42 | + .Items(items => |
| 43 | + { |
| 44 | + items.Add().Id("keep-text").Text("Keep Text Only").Icon("paste-plain-text"); |
| 45 | + items.Add().Id("paste-html").Text("Paste as HTML").Icon("paste-as-html"); |
| 46 | + items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("paste-markdown"); |
| 47 | + } |
| 48 | + ) |
| 49 | +``` |
| 50 | +{% if site.core %} |
| 51 | +```TagHelper |
| 52 | + <kendo-dropdownbutton name="DropDownButton" text="Paste" icon="paste" size="ComponentSize.Medium"> |
| 53 | + <dropdownbutton-items> |
| 54 | + <item id="keep-text" text="Keep Text Only" icon="paste-plain-text"></item> |
| 55 | + <item id="paste-html" text="Paste as HTML" icon="paste-as-html"></item> |
| 56 | + <item id="paste-markdown" text="Paste Markdown" icon="paste-markdown"></item> |
| 57 | + </dropdownbutton-items> |
| 58 | + </kendo-dropdownbutton> |
| 59 | +``` |
| 60 | +{% endif %} |
| 61 | + |
| 62 | +### FillMode |
| 63 | + |
| 64 | +To manipulate the fill mode of the DropDownButton, configure the `FillMode()` method with any of the following values: |
| 65 | + |
| 66 | +- `Solid` |
| 67 | +- `Outline` |
| 68 | +- `Flat` |
| 69 | +- `None` |
| 70 | + |
| 71 | +The default `FillMode` value is `Solid`. |
| 72 | + |
| 73 | +```HtmlHelper |
| 74 | + @(Html.Kendo().DropDownButton() |
| 75 | + .Name("DropDownButton") |
| 76 | + .Icon("paste") |
| 77 | + .FillMode(FillMode.Solid) |
| 78 | + .Items(items => |
| 79 | + { |
| 80 | + items.Add().Id("keep-text").Text("Keep Text Only").Icon("paste-plain-text"); |
| 81 | + items.Add().Id("paste-html").Text("Paste as HTML").Icon("paste-as-html"); |
| 82 | + items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("paste-markdown"); |
| 83 | + } |
| 84 | + ) |
| 85 | +``` |
| 86 | +{% if site.core %} |
| 87 | +```TagHelper |
| 88 | + <kendo-dropdownbutton name="DropDownButton" text="Paste" icon="paste" fill-mode="FillMode.Solid"> |
| 89 | + <dropdownbutton-items> |
| 90 | + <item id="keep-text" text="Keep Text Only" icon="paste-plain-text"></item> |
| 91 | + <item id="paste-html" text="Paste as HTML" icon="paste-as-html"></item> |
| 92 | + <item id="paste-markdown" text="Paste Markdown" icon="paste-markdown"></item> |
| 93 | + </dropdownbutton-items> |
| 94 | + </kendo-dropdownbutton> |
| 95 | +``` |
| 96 | +{% endif %} |
| 97 | + |
| 98 | +### ThemeColor |
| 99 | + |
| 100 | +To specify the theme color of the DropDownButton, configure the `ThemeColor()` method with any of the following values: |
| 101 | + |
| 102 | +- `Base` |
| 103 | +- `Primary` |
| 104 | +- `Secondary` |
| 105 | +- `Tertiary` |
| 106 | +- `Info` |
| 107 | +- `Success` |
| 108 | +- `Warning` |
| 109 | +- `Error` |
| 110 | +- `Dark` |
| 111 | +- `Light` |
| 112 | +- `Inverse` |
| 113 | + |
| 114 | +The default `ThemeColor` value is `Base`. |
| 115 | + |
| 116 | +```HtmlHelper |
| 117 | + @(Html.Kendo().DropDownButton() |
| 118 | + .Name("DropDownButton") |
| 119 | + .Icon("paste") |
| 120 | + .ThemeColor(ThemeColor.Base) |
| 121 | + .Items(items => |
| 122 | + { |
| 123 | + items.Add().Id("keep-text").Text("Keep Text Only").Icon("paste-plain-text"); |
| 124 | + items.Add().Id("paste-html").Text("Paste as HTML").Icon("paste-as-html"); |
| 125 | + items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("paste-markdown"); |
| 126 | + } |
| 127 | + ) |
| 128 | +``` |
| 129 | +{% if site.core %} |
| 130 | +```TagHelper |
| 131 | + <kendo-dropdownbutton name="DropDownButton" text="Paste" icon="paste" theme-color="ThemeColor.Base"> |
| 132 | + <dropdownbutton-items> |
| 133 | + <item id="keep-text" text="Keep Text Only" icon="paste-plain-text"></item> |
| 134 | + <item id="paste-html" text="Paste as HTML" icon="paste-as-html"></item> |
| 135 | + <item id="paste-markdown" text="Paste Markdown" icon="paste-markdown"></item> |
| 136 | + </dropdownbutton-items> |
| 137 | + </kendo-dropdownbutton> |
| 138 | +``` |
| 139 | +{% endif %} |
| 140 | + |
| 141 | +### Rounded |
| 142 | + |
| 143 | +To set the border radius of the DropDownButton, configure the `Rounded()` method with any of the following values: |
| 144 | + |
| 145 | +- `Small` |
| 146 | +- `Medium` |
| 147 | +- `Large` |
| 148 | +- `Full` |
| 149 | +- `None` |
| 150 | + |
| 151 | +The default `Rounded` value is `Medium`. |
| 152 | + |
| 153 | +```HtmlHelper |
| 154 | + @(Html.Kendo().DropDownButton() |
| 155 | + .Name("DropDownButton") |
| 156 | + .Icon("paste") |
| 157 | + .Rounded(Rounded.Medium) |
| 158 | + .Items(items => |
| 159 | + { |
| 160 | + items.Add().Id("keep-text").Text("Keep Text Only").Icon("paste-plain-text"); |
| 161 | + items.Add().Id("paste-html").Text("Paste as HTML").Icon("paste-as-html"); |
| 162 | + items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("paste-markdown"); |
| 163 | + } |
| 164 | + ) |
| 165 | +``` |
| 166 | +{% if site.core %} |
| 167 | +```TagHelper |
| 168 | + <kendo-dropdownbutton name="DropDownButton" text="Paste" icon="paste" rounded="Rounded.Medium"> |
| 169 | + <dropdownbutton-items> |
| 170 | + <item id="keep-text" text="Keep Text Only" icon="paste-plain-text"></item> |
| 171 | + <item id="paste-html" text="Paste as HTML" icon="paste-as-html"></item> |
| 172 | + <item id="paste-markdown" text="Paste Markdown" icon="paste-markdown"></item> |
| 173 | + </dropdownbutton-items> |
| 174 | + </kendo-dropdownbutton> |
| 175 | +``` |
| 176 | +{% endif %} |
| 177 | + |
| 178 | +## See Also |
| 179 | + |
| 180 | +* [Appearance of the DropDownButton HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/dropdownbutton/appearance) |
| 181 | +* [Button Server-Side API](/api/button) |
| 182 | +* [Button Client-Side API](https://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownbutton) |
0 commit comments