public void SetAverageColor() { if (averageColor.R + averageColor.G + averageColor.B < 382) { titleBarHelper.SetToDarkTitleBar(); gridColorTitle.RequestedTheme = ElementTheme.Dark; } else { titleBarHelper.SetToLightTitleBar(); gridColorTitle.RequestedTheme = ElementTheme.Light; } }