Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Not Able to Declare a Bitmap Variable

$
0
0

I'm currently doing the Graphics and Animation tutorial. The tutorial tells me to make a canvas object by using a Bitmap object but it doesnt let me declare a variable as a Bitmap...

Heres my code: using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS;

namespace GraphicsAndAnimation { [Activity (Label = "GraphicsAndAnimation", MainLauncher = true)] public class MainActivity : Activity {

    protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

        BitMap bitMap = Bitmap  100, 100, BitMap.Config.Argb8888);
        Canvas canvas = new Canvas (bitMap);

        SetContentView (Resource.Layout.Main);



    }
}

}


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>