2

The Element class has a Tapped event which can be used to respond to taps of the element.

However, when a element has its accessory set to DetailDisclosureButton, there is no way it seems to respond to the tap of the DetailDisclosureButton.

Using MonoTouch.Dialog, how do we respond to the DetailDisclosureButton tap?

poupou
  • 43,413
  • 6
  • 77
  • 174
Ian Vink
  • 66,960
  • 104
  • 341
  • 555

1 Answers1

3

Right now it does not look possible without editing or better inheriting from DialogViewController since the UITableViewSource (or UITableViewDelegate) method AccessoryButtonTapped is not overridden by MonoTouch.Dialog itself.

To fix this you can override DialogViewController.CreateSizingSource to return your own Source which overrides AccessoryButtonTapped.

IMO that's something that should be part of MonoTouch.Dialog so you're welcome to send a pull request to Miguel (or I'll do it myself later).

UPDATE patch for immediate enjoyment

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Excellent. MonoTouch without MonoTouch.Dialog would make MonoTouch useless for us Enterprise developers making line of business apps. I'd vote to have MTD included into MonoTouch :) – Ian Vink Nov 19 '11 at 23:25
  • @BahaiResearch.com look at first item on the (yet to be released) MonoTouch 5.1 (beta) http://ios.xamarin.com/Releases/MonoTouch_5/MonoTouch_5.1 – poupou Nov 19 '11 at 23:45
  • That is outstanding! Will it get updated as often as the GIT version does? Having all those people contribute to it has made MT.dialog library an outstanding resource. We're probably going to buy MonoDroid, but really need MonoDriod.Dialog to sell it to the enterprise. – Ian Vink Nov 20 '11 at 01:18
  • Too soon to say for sure - but I suspect every new version of MT will get an updated MT.D from GIT. There's a MonoDroid.Dialog available on GIT (I use it for Andr.Unit) but it's not from Xamarin and it's not (yet) as easy/powerful as the MonoTouch version. – poupou Nov 20 '11 at 01:41