@using System.Globalization @using System.Drawing @code { [Parameter] public WebReport WebReport { get; set; } protected override void OnParametersSet() { ToolbarHeight = WebReport.Toolbar.Height.ToString() + "px"; } //protected override bool ShouldRender() => false; private string Width { get { if (!WebReport.Width.IsNullOrWhiteSpace()) return WebReport.Width + "px"; return string.Empty; } } private string Height { get { if (!WebReport.Height.IsNullOrWhiteSpace()) return WebReport.Height + "px"; return string.Empty; } } private string ToolbarHeight { get; set; } private string CalculateToolBarHeight(float variable) { var calculatedHeight = WebReport.Toolbar.Height * variable; return $"{calculatedHeight.ToString("0.##", CultureInfo.InvariantCulture)}px"; } }