kendo-ui
Temas
Buscar..
Configuración de un tema
Primero necesitamos hacer referencia a los estilos que queremos usar.
<link rel="stylesheet" href="[file path]/kendo.common.min.css" />
<link rel="stylesheet" href="[file path]/kendo.[Theme].min.css" />
Ahora, la mayoría de los controles usan el [Theme]
, dado en el Recurso de estilo anterior.
Algunos controles como Chart, TreeMap, Diagram, StockChart, Sparkline, RadialGauge y LinearGauge se representan con diseños calculados en JavaScript y necesitan una configuración adicional en la inicialización.
Por ejemplo el gráfico:
$("#chart").kendoChart({
theme: "blueOpal",
//...
});
Lista de temas:
"black", "blueOpal", "bootstrap", "default", "flat", "highContrast", "material", "materialBlack", "metro", "metroBlack", "moonlight", "silver", "uniform", "fiori"(kendo ui pro), "nova"
Para configurarlos globalmente, puedes anular Kendo de esta manera:
//The Themable Elements
var themable = ["Chart", "TreeMap", "Diagram", "StockChart", "Sparkline", "RadialGauge", "LinearGauge"];
//Check if kendo.dataviz is available
if (kendo.dataviz) {
//Set for each control the default theme
for (var i = 0; i < themable.length; i++) {
var widget = kendo.dataviz.ui[themable[i]];
if (widget) {
widget.fn.options.theme = "blueOpal";
}
}
}
Modified text is an extract of the original Stack Overflow Documentation
Licenciado bajo CC BY-SA 3.0
No afiliado a Stack Overflow