A dashboard carries its own colors; you can read them on the server and pass them to the layout so the surrounding web page matches the dashboard.

Read the theme colors from the dashboard page. In the Index action:
var report = StiReport.CreateNewDashboard();
report.Load(StiNetCoreHelper.MapPath(this, $"Dashboards/{id}.mrt"));

var dashboard = report.Pages[0] as StiDashboard;
ViewBag.DashboardBackHtmlColor = ColorTranslator.ToHtml(StiDashboardStyleHelper.GetDashboardBackColor(dashboard, true));
ViewBag.BackHtmlColor = ColorTranslator.ToHtml(StiDashboardStyleHelper.GetBackColor(dashboard));
ViewBag.ForeHtmlColor = ColorTranslator.ToHtml(StiDashboardStyleHelper.GetForeColor(dashboard));

How it works. The page picks up the dashboard's own palette, so the frame around the viewer blends seamlessly with the dashboard style.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.