protected override async Task OnInitializedAsync() { aBTestsData = (await TJBarnesService.GetHttpClient() .GetFromJsonAsync <ABTestData[]>("api/abtests")).ToList(); BrowserDimensions browserDimensions = await JSRuntime.InvokeAsync <BrowserDimensions>("getDimensions"); testSpec.BrowserWidth = browserDimensions.Width; testSpec.BrowserHeight = browserDimensions.Height; testSpec.DeviceLoad = Device.DeviceLoad; testSpec.SaveLabel = "Save"; testSpec.DiameterScale = ScreenSizing.DiameterScale(testSpec.BrowserWidth); testSpec.XScale = ScreenSizing.XScale(testSpec.BrowserWidth); testSpec.YScale = ScreenSizing.YScale(testSpec.BrowserWidth); testSpec.BorderWidth = ScreenSizing.BorderWidth(testSpec.BrowserWidth); testSpec.FontSize = ScreenSizing.FontSize(testSpec.BrowserWidth); testSpec.FontPaddingTop = ScreenSizing.FontPaddingTop(testSpec.BrowserWidth); testSpec.StrokeLabelXOffset = ScreenSizing.StrokeLabelXOffset(testSpec.BrowserWidth); testSpec.StrokeLabelYOffset = ScreenSizing.StrokeLabelYOffset(testSpec.BrowserWidth); testSpec.RowStartLabelWidth = ScreenSizing.RowStartLabelWidth(testSpec.BrowserWidth); testSpec.RowStartLabelHeight = ScreenSizing.RowStartLabelHeight(testSpec.BrowserWidth); testSpec.ChangeLabelXOffset = ScreenSizing.ChangeLabelXOffset(testSpec.BrowserWidth); testSpec.ChangeLabelYOffset = ScreenSizing.ChangeLabelYOffset(testSpec.BrowserWidth); testSpec.SubmitLabel1 = "A has errors"; testSpec.SubmitLabel2 = "B has errors"; testSpec.SubmitLabel3 = "I can't tell which has errors"; screenA.IsA = true; screenA.XMargin = ScreenSizing.XMargin(testSpec.BrowserWidth); screenA.YMargin = ScreenSizing.YMargin(testSpec.BrowserWidth); screenA.PlayLabel = "Play A"; screenB.IsA = false; screenB.XMargin = ScreenSizing.XMargin(testSpec.BrowserWidth); screenB.YMargin = ScreenSizing.YMarginB(testSpec.BrowserWidth); screenB.PlayLabel = "Play B"; }