Reputation: 73
I'am working on a app where the user can put in some data and then take a image with the camera or from the device.
The problem i'am having is that i cant seem to get a cell or element to only display a image. Width of the image would be the width of the cell(Grouped style) it's in. Height i would like to specify myself.
I've tried to subclass ImageElement but can't change the size of it.
Is the already a Element i could use for this or is there any other good way of doing it?
Upvotes: 3
Views: 805
Reputation: 7407
Try to use the UIViewElement with an UIImageView:
var imageView = new UIImageView(new RectangleF(0, 0, 300, 100));
imageView.ContentMode = UIViewContentMode.Center;
var element = new UIViewElement(String.Empty, imageView, true);
Upvotes: 4