Xamarin.Forms.Forms.Init() 未找到
Xamarin.Forms.Forms.Init() not found
我正在尝试使用 Xamarin 将 Oxyplot 提升到 运行 以获得 Android 应用程序。文档说明如下:
Initialize renderers
You need to initialize the OxyPlot renderers by adding the following
call just after Xamarin.Forms.Forms.Init():
iOS (Unified API): OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init();
Android: OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
Universal Windows: OxyPlot.Xamarin.Forms.Platform.UWP.PlotViewRenderer.Init();
Windows Phone: OxyPlot.Xamarin.Forms.Platform.WP8.PlotViewRenderer.Init();
Tip: Search for “Xamarin.Forms.Forms.Init()” in your solution to find
all the places you need to add code.
我在我的解决方案中搜索了 "Xamarin.Forms.Forms.Init()",但找不到该字符串。关于如何从这里开始以及如何获得简单的 oxyplot 示例应用程序的任何提示 运行?
调用 Xamarin.Forms.Forms.Init()
在 protected override void OnCreate
中调用 MainActivity.cs
。
[Activity(Label = "fooApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
LoadApplication(new App());
}
}
我正在尝试使用 Xamarin 将 Oxyplot 提升到 运行 以获得 Android 应用程序。文档说明如下:
Initialize renderers
You need to initialize the OxyPlot renderers by adding the following call just after Xamarin.Forms.Forms.Init():
iOS (Unified API): OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init(); Android: OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init(); Universal Windows: OxyPlot.Xamarin.Forms.Platform.UWP.PlotViewRenderer.Init(); Windows Phone: OxyPlot.Xamarin.Forms.Platform.WP8.PlotViewRenderer.Init();
Tip: Search for “Xamarin.Forms.Forms.Init()” in your solution to find all the places you need to add code.
我在我的解决方案中搜索了 "Xamarin.Forms.Forms.Init()",但找不到该字符串。关于如何从这里开始以及如何获得简单的 oxyplot 示例应用程序的任何提示 运行?
调用 Xamarin.Forms.Forms.Init()
在 protected override void OnCreate
中调用 MainActivity.cs
。
[Activity(Label = "fooApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
LoadApplication(new App());
}
}