Look at this class inside the Xamarin sample https://github.com/xamarin/monotouch-samples/blob/master/Sound/Sound/SoundViewController.cs
Basically, you would want to create you're own DialogViewController
:
You will need the using
statements from the sample.
using MonoTouch.AVFoundation;
using System.Diagnostics;
using System.IO;
using MonoTouch.AudioToolbox;
public class SoundRecorder : DialogViewController {
this.Title = "Record Sound";
root = new RootElement() {
new section () {
new StringElement ("Record", delegate {
// sound recording code from sample for the first button
}
}
}
}
This should give you a start.
You may want to separate the elements and declare them separately like this:
StringElement myElement = new StyledStringElement("record something");
You can then subscribe to the tapped event with a delegate and handle the when a button is hit that way too.
So that you can do a little more. For more styling choices you would want a StyledStringElement
Hope this helps