1. 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 …
    read more
  2. Accessing the Android Barometer using Xamarin.Android

    Easily:

    < ![CDATA[
    [Activity (Label = "HelloBarometer", MainLauncher = true)]
    public class Activity1 : Activity, ISensorEventListener
    {
        TextView mainLabel;  
    
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            //Detect the barometer
            var sm = (SensorManager) this.GetSystemService(Context.SensorService);
            var barry = sm.GetDefaultSensor(SensorType …
    read more

Page 1 / 1

blogroll

social