public SampleView (Context context) : base (context) { Focusable = true; Stream input = context.Resources.OpenRawResource (Resource.Drawable.app_sample_code); mBitmap = BitmapFactory.DecodeStream (input); mBitmap2 = mBitmap.ExtractAlpha (); mBitmap3 = Bitmap.CreateBitmap (200, 200, Bitmap.Config.Alpha8); DrawIntoBitmap (mBitmap3); mShader = new LinearGradient (0, 0, 100, 70, new int[] { Color.Red, Color.Green, Color.Blue }, null, Shader.TileMode.Mirror); }