private void AddImage(string text) { imageName = text; CustomWebView webView = new CustomWebView() { Frame = new CGRect(0, 0, 150, 150), }; var path = NSBundle.MainBundle.PathForResource("Images/ImageEditor/" + imageName, "svg"); var url = new NSUrl(path); var urlreq = new NSUrlRequest(url); webView.LoadRequest(urlreq); if (isReplaced) { if (customViewSettings != null) { imageEditor.AddCustomView(webView, new CustomViewSettings() { Bounds = customViewSettings.Bounds }); } } else { imageEditor.AddCustomView(webView, new CustomViewSettings() { }); } }
private void AddImage(string text) { imageName = text; var path = NSBundle.MainBundle.PathForResource("Images/ImageEditor/I" + imageName, "png"); UIImage image = new UIImage(path); UIImageView imageView = new UIImageView(); imageView.Image = image; imageView.Frame = new CGRect(0, 0, 150, 150); if (isReplaced) { if (customViewSettings != null) { imageEditor.AddCustomView(imageView, new CustomViewSettings() { Bounds = customViewSettings.Bounds }); } } else { imageEditor.AddCustomView(imageView, new CustomViewSettings() { }); } }
private void SetSVGImage(string name) { imageName = name; ImageView view = new ImageView(this); view.LayoutParameters = new ViewGroup.LayoutParams(200, 200); if (imageName == "ITypogy1") { view.SetImageResource(Resource.Drawable.Typogy1); } else if (imageName == "ITypogy2") { view.SetImageResource(Resource.Drawable.Typogy2); } else if (imageName == "ITypogy3") { view.SetImageResource(Resource.Drawable.Typogy3); } else if (imageName == "ITypogy4") { view.SetImageResource(Resource.Drawable.Typogy4); } else if (imageName == "ITypogy5") { view.SetImageResource(Resource.Drawable.Typogy5); } else if (imageName == "ITypogy6") { view.SetImageResource(Resource.Drawable.Typogy6); } if (isReplaced) { imageEditor.AddCustomView(view, new CustomViewSettings() { Bounds = customViewSettings.Bounds }); } else { imageEditor.AddCustomView(view, new CustomViewSettings() { }); } }