Deprecated; see https://aka.ms/dotnet-discord, and please use use #android on the DotNetEvolution Discord
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
button = FindViewById<Button>(Resource.Id.myButton);
button.Click += delegate {
var imageIntent = new Intent();
imageIntent.SetType("image/*");
imageIntent.SetAction(Intent.ActionGetContent);
StartActivityForResult(
Intent.CreateChooser(imageIntent, "Select photo"), 0);
};
}
if (resultCode == Result.Ok)
{
var imageView =
FindViewById<ImageView>(Resource.Id.myImageView);
imageView.SetImageURI(data.Data);
}
}