Using MonoTouch.Dialog's ImageElement as read-only

444 Views Asked by At

I would like to use MonoTouch.Dialog framewrok to display some readonly info. I think I can get along with using labels for all my values and the only problem I have is with an UIImage. I would like to show an UIImage but prevent the UIImagePickerController from being used.

Is this possible? How?

1

There are 1 best solutions below

0
On BEST ANSWER

I assume you're using ImageElement ?

If so simply create your own MyImageElement type that inherits from ImageElement and override the Selected method to do nothing (or something else). E.g.

class MyImageElement : ImageElement {

    public MyImageElement (UIImage image) : base (image)
    {
    }

    public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
    {
    }
}