Навигация в Android Xamarin(C#)

Я пытаюсь сделать навигационный вид и DrawerLayout

Вот мой axml:

    <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
        
        
        android_layout_width="match_parent"
        android_layout_height="match_parent"
        android_fitsSystemWindows="true">

  <!-- your content layout -->

  <android.support.design.widget.NavigationView
          android_layout_width="wrap_content"
          android_layout_height="match_parent"
          android_layout_gravity="start"
          android_id="@+id/nav_view"

          app_menu="@menu/nav_menu"/>
</android.support.v4.widget.DrawerLayout>

А вот моя активность:

  using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using MvvmCross.Droid.Views;
using Android.Support.V4.Widget;
using Android.Support.Design.Widget;
using Android.Content.PM;

namespace TieiT.Droid.Views
{
    [Activity(Label = "GeneralInfo", ScreenOrientation = ScreenOrientation.Portrait)]
    public class GeneralInfo : MvxActivity
    {
        DrawerLayout drawerLayout;
        NavigationView navigationView;
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.GeneralInfo);
            // Create your application here
            var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            navigationView = FindViewById<NavigationView>(Resource.Id.nav_view);

            navigationView.NavigationItemSelected += (sender, e) =>
            {
                e.MenuItem.SetChecked(true);
                //react to click here and swap fragments or navigate
                drawerLayout.CloseDrawers();
            };

        }
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
                case Android.Resource.Id.Home:
                    drawerLayout.OpenDrawer(Android.Support.V4.View.GravityCompat.Start);
                    return true;
            }
            return base.OnOptionsItemSelected(item);
        }
    }
}

У меня есть эти ошибки:

Error   CS0103  The name 'SupportActionBar' does not exist in the current context   TieiT.Droid F:ConfTieiT.CoreTieiT.DroidViewsGeneralInfo.cs 31  Active



Error   CS0103  The name 'SupportActionBar' does not exist in the current context   TieiT.Droid F:ConfTieiT.CoreTieiT.DroidViewsGeneralInfo.cs 32  Active



Error   CS0103  The name 'SetSupportActionBar' does not exist in the current context    TieiT.Droid F:ConfTieiT.CoreTieiT.DroidViewsGeneralInfo.cs 30  Active




Error   CS0117  'Resource.Id' does not contain a definition for 'drawer_layout' TieiT.Droid F:ConfTieiT.CoreTieiT.DroidViewsGeneralInfo.cs 34  Active

Может быть, есть глупые вопросы, но я новичок.
Как я могу исправить эти ошибки?

Спасибо за ответ и помощь.

1 ответ