小编use*_*428的帖子

这个Xamarin自定义渲染器教程中的CameraOptions类型是什么?

我很可能只是一个白痴,为此我提前道歉.无论如何,我正在尝试将相机功能添加到我的Xamarin.Forms(以iOS为中心)的应用程序中.

我在Xamarin的网站上找到了这个教程并且正在关注它(https://developer.xamarin.com/guides/xamarin-forms/custom-renderer/view/).

但是,我没有看到CameraOptions类型的定义 - 它为我抛出了一个错误,类似于"在此上下文中没有CameraOptions的定义".

我想我必须错过"使用"声明,但我想不出任何使用.

这是我开始感到困惑的代码的一部分:

public class CameraPreview : View
{
  public static readonly BindableProperty CameraProperty =
    BindableProperty.Create<CameraPreview, CameraOptions> (p => p.Camera, CameraOptions.Rear);

  public CameraOptions Camera {
    get { return (CameraOptions)GetValue (CameraProperty); }
    set { SetValue (CameraProperty, value); }
  }
}
Run Code Online (Sandbox Code Playgroud)

说真的.什么是CameraOptions类型?在整个教程中没有提到一次,它只是在代码中使用,所以我必须遗漏一些东西.

c# camera ios xamarin xamarin.forms

2
推荐指数
1
解决办法
518
查看次数

标签 统计

c# ×1

camera ×1

ios ×1

xamarin ×1

xamarin.forms ×1