在 Xamarin.Android 中,如果将背景设置为透明,它只会使背景变黑。代码:
this.sciChartSurface.SetBackgroundColor(Android.Graphics.Color.Transparent);
this.sciChartSurface.Background.Alpha = 0;
this.sciChartSurface.Background.SetAlpha(0);
在 Xamarin.Android 中,如果将背景设置为透明,它只会使背景变黑。代码:
this.sciChartSurface.SetBackgroundColor(Android.Graphics.Color.Transparent);
this.sciChartSurface.Background.Alpha = 0;
this.sciChartSurface.Background.SetAlpha(0);
问题是 Scichart Android 中的默认 RenderSurface 实现使用 OpenGL,它不允许透明或合成图表下的视图。
但是,SciChart 提供了一种替代方法,允许您执行此操作。
看看https://www.scichart.com/questions/question/transparent-bacground并将 SciChartSurface 上的 RenderSurface 设置为GLTextureView实例,它应该可以工作