title: Using AppCompat-Toolbar in Xamarin.Android without deriving from AppCompatActivity?
body: <p>I want to add a toolbar to an activity in my Xamarin.Android app. This should work in older versions of Android, so I am implementing this functionality with the  Android Support v7 AppCompat library.</p>
  
  <p>In order to make the toolbar act like an action bar, I would have to call SetSupportActionBar (seen <a href="https://github.com/xamarin/monodroid-samples/blob/master/Supportv7/AppCompat/Toolbar/Supportv7Toolbar/MainActivity.cs" rel="nofollow">here</a>.</p>
  
  <pre><code>public class MainActivity : AppCompatActivity
  {
      protected override void OnCreate (Bundle bundle)
      {
          base.OnCreate (bundle);
  
          // Set our view from the "main" layout resource
          SetContentView (Resource.Layout.main);
  
          var toolbar = FindViewById&lt;Toolbar&gt; (Resource.Id.toolbar);
  
          //Toolbar will now take on default actionbar characteristics
          SetSupportActionBar (toolbar);
  
          SupportActionBar.Title = "Hello from Appcompat Toolbar";
  
          // ...
      }
  }
  </code></pre>
  
  <p>The method SetSupportActionBar is from AppCompatActivity, which is why the Activity in the sample code derives from that class in the first place.</p>
  
  <p>Now, is there a way to make use of AppCompatActivity's functionality such as SetSupportActionBar if I can't derive my Activity from AppCompatActivity?</p>
  
  <p>My activity must extend another base class to function properly.</p>