3

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?

Andreas
  • 73
  • 7

1 Answers1

4

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);
giacomelli
  • 7,287
  • 2
  • 27
  • 31
  • This is defenetly a step in the right direction. Image shows up and i can set the size of it. Now one problem remains, the cell does not change height. – Andreas Oct 16 '12 at 20:46
  • 1
    You will need to inherit UIViewElement and override the GetHeight method. – giacomelli Oct 17 '12 at 10:50