// --------------------------------------------------------- #region Overrides protected override void OnElementChanged(ElementChangedEventArgs <Image> e) { base.OnElementChanged(e); if (e.NewElement != null) { _formsView = (ManneDoForms.Components.PaintView.MannePaintView)e.NewElement; this.Control.UserInteractionEnabled = true; this.Control.MultipleTouchEnabled = true; this.Control.Image = new UIImage(); } }
// --------------------------------------------------------- #region Overrides protected override void OnElementChanged(ElementChangedEventArgs <Image> e) { base.OnElementChanged(e); if (e.NewElement != null) { _formsView = (ManneDoForms.Components.PaintView.MannePaintView)e.NewElement; _currentPaint = new Android.Graphics.Paint(); _currentPaint.Dither = true; _currentPaint.SetStyle(Android.Graphics.Paint.Style.Stroke); _currentPaint.StrokeJoin = Android.Graphics.Paint.Join.Round; _currentPaint.StrokeCap = Android.Graphics.Paint.Cap.Round; _deviceDensity = AndroidDevice.DisplayMetrics.Density > 1 ? AndroidDevice.DisplayMetrics.Density : 1; } }