Posts categorized under: Xamarin

UIWebView.SetCenterCoordinate is asynchronous

You cannot rely on the value of UIWebView.CenterCoordinate after setting UIWebView.SetCenterCoordinate and I don't know of any event that is raised when it is finally set. To be more specific:

var map = new MKMapView();

var ctr = new CLLocationCoordinate2D(37.8, -122.4);
map.SetCenterCoordinate(ctr, false);
map.SetRegion …

Cross-Platform Mobile Architectural Patterns

This post contains links and references to subjects discussed in my MonkeySpace 2013 talk.

Naturally, the talk was grounded in Xamarin Studio.

Xamarin's Field Service App is a reference implementation for cross-platform MVVM.

The Xamarin DCI example source code can be found here.

Essential books on software-architectural patterns:

Accessing the Android Barometer using Xamarin.Android


``` {.brush: .csharp} < ![CDATA[ [Activity (Label = "HelloBarometer", MainLauncher = true)] public class Activity1 : Activity, ISensorEventListener { TextView mainLabel;

protected override void OnCreate(Bundle bundle)
    // Set our view from the "main" layout resource
    //Detect the barometer
    var sm = (SensorManager) this.GetSystemService(Context.SensorService);
    var barry = sm …