-
Notifications
You must be signed in to change notification settings - Fork 102
/
ToolbarController.cs
36 lines (33 loc) · 1.1 KB
/
ToolbarController.cs
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
using DevExtreme.MVC.Demos.Models.SampleData;
using DevExtreme.MVC.Demos.ViewModels;
using DevExtreme.AspNet.Data;
using DevExtreme.AspNet.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Newtonsoft.Json;
namespace DevExtreme.MVC.Demos.Controllers {
public class ToolbarController : Controller {
#region Overview
public ActionResult Overview() {
return View();
}
[HttpGet]
public ActionResult GetProducts(DataSourceLoadOptions loadOptions) {
return Content(JsonConvert.SerializeObject(DataSourceLoader.Load(SampleData.Products, loadOptions)), "application/json");
}
#endregion
#region Adaptability
public ActionResult Adaptability() {
return View(new ToolbarViewModel() {
FontFamilies = ToolbarData.FontFamilies,
Headings = ToolbarData.Headings,
FontSizes = ToolbarData.FontSizes,
LineHeights = ToolbarData.LineHeights,
});
}
#endregion
}
}