Accordion
Accordion
Overview
The Accordion control allows you to organize content into collapsible panes.
Features
Accordion
Change the properties of this Accordion.
Connection
Wi-Fi, Mobile, Data usage, and Hotspot
Connected Devices
Bluetooth, NFC
Apps & Notifications
Recent apps, Default apps, Block, Allow
Battery
39% - Should last until about 7:35 PM
Description
This sample demonstrates the usage and main properties of the Accordion control.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using MvcExplorer.Models; using Microsoft.AspNetCore.Mvc; using System.Linq; using System.Collections.Generic; using Microsoft.AspNetCore.Http; namespace MvcExplorer.Controllers { public partial class AccordionController : Controller { // GET: Index public ActionResult Index(IFormCollection collection) { return View(); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | < c1-accordion id = "mvcAccordion" > < div > <!-- pane --> < div class = "main-pane" > <!-- header --> Accordion < div class = "desc" > Change the properties of this Accordion. </ div > </ div > < div > <!-- content --> < div class = "wj-labeled-input switch" > < input id = "showIcons" type = "checkbox" checked /> < label for = "showIcons" > ShowIcons < span >Show icon in the pane headers</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "autoSwitch" type = "checkbox" checked /> < label for = "autoSwitch" > AutoSwitch < span >Expand panes when selecting with the keyboard</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "isAnimated" type = "checkbox" checked /> < label for = "isAnimated" > IsAnimated < span >Animate pane collapse/expand</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "allowCollapseAll" type = "checkbox" /> < label for = "allowCollapseAll" > AllowCollapseAll < span >Can collapse all panes</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "allowExpandMany" type = "checkbox" /> < label for = "allowExpandMany" > AllowExpandMany < span >Can expand multiple panes</ span > </ label > </ div > </ div > </ div > < div > <!-- pane --> < div > <!-- header --> Connection < div class = "desc" > Wi-Fi, Mobile, Data usage, and Hotspot </ div > </ div > < div > <!-- content --> < div class = "wj-labeled-input switch" > < input id = "wifi" type = "checkbox" checked /> < label for = "wifi" > Wi-Fi < span >Turn Wi-fi on or off</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "mobiledata" type = "checkbox" /> < label for = "mobiledata" > Mobile Data < span >Turn Mobile data on or off</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "bluetooth" type = "checkbox" checked /> < label for = "bluetooth" > Bluetooth < span >Turn Bluetooth on or off</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "apmode" type = "checkbox" /> < label for = "apmode" > Airplane Mode < span >Turn Airplane mode on or off</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "hotspot" type = "checkbox" /> < label for = "hotspot" > Hot Spot & Tethering < span >Hotspot on, Tethering</ span > </ label > </ div > </ div > </ div > < div > <!-- pane --> < div > <!-- header --> Connected Devices < div class = "desc" > Bluetooth, NFC </ div > </ div > < div > <!-- content --> < div class = "wj-labeled-input switch" > < input id = "dev1" type = "checkbox" checked /> < label for = "dev1" > Gear Fit2 Pro < span >Health monitor</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "dev2" type = "checkbox" /> < label for = "dev2" > SYNC < span >Car connection</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "dev3" type = "checkbox" /> < label for = "dev3" > Samsung XT-9343 < span >TV</ span > </ label > </ div > < button class = "btn btn-primary" > See More... </ button > </ div > </ div > < div > <!-- pane --> < div > <!-- header --> Apps & Notifications < div class = "desc" > Recent apps, Default apps, Block, Allow </ div > </ div > < div > <!-- content --> < div class = "wj-labeled-input switch" > < input id = "app-chrome" type = "checkbox" /> < label for = "app-chrome" > Chrome < span >Web browser</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "app-outlook" type = "checkbox" /> < label for = "app-outlook" > Outlook < span >Mail and schedule</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "app-fb" type = "checkbox" checked /> < label for = "app-fb" > Facebook < span >Social media</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "app-twitter" type = "checkbox" /> < label for = "app-twitter" > Twitter < span >Social media</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "app-teams" type = "checkbox" checked /> < label for = "app-teams" > Teams < span >Chat, Meetings, Calling, Collaboration</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "app-skype" type = "checkbox" /> < label for = "app-skype" > Skype < span >Chat, Meetings, Calling, Collaboration</ span > </ label > </ div > < button class = "btn btn-primary" > See More... </ button > </ div > </ div > < div > <!-- pane --> < div > <!-- header --> Battery < div class = "desc" > < span style = "color:orangered" >39%</ span > - Should last until about 7:35 PM </ div > </ div > < div > <!-- content --> < div class = "wj-labeled-input switch" > < input id = "bat-sav" type = "checkbox" checked /> < label for = "bat-sav" > Battery Saver < span >Slow down to reduce battery usage</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "bat-adapt" type = "checkbox" /> < label for = "bat-adapt" > Adaptive Battery < span >Detect when apps drain battery</ span > </ label > </ div > < div class = "wj-labeled-input switch" > < input id = "bat-pct" type = "checkbox" /> < label for = "bat-pct" > Battery Percentage < span >Show battery percentage</ span > </ label > </ div > </ div > </ div > </ c1-accordion > @section Styles{ < style type = "text/css" > /* Accordion: */ /* customize the labeled inputs */ .wj-labeled-input { width: 30%; } .wj-labeled-input > label > span { display: block; font-weight: normal; font-size: 90%; opacity: .90; color: black; } </ style > } @section Scripts{ <script> c1.documentReady( function () { let acc = wijmo.Control.getControl( "#mvcAccordion" ); link(acc, 'showIcons' ); link(acc, 'autoSwitch' ); link(acc, 'isAnimated' ); link(acc, 'allowCollapseAll' ); link(acc, 'allowExpandMany' ); }); function link(acc, id) { let cb = document.getElementById(id); acc[id] = cb. checked ; cb.addEventListener( 'click' , function (e) { acc[id] = cb. checked ; }); } </script> } @section Summary{ < p > @Html .Raw(AccordionRes.Index_Text0)</ p > } @section Description{ < p > @Html .Raw(AccordionRes.Index_Text1)</ p > } |