Hi guys,

I know that this is probably asked million of times but I can find a nice 
solution to dismiss a keyboard in MonoTouch.Dialog.

On the internet I have found two solutions, one from Miguel,

//Gesture recognizer for handling EndEditing of Elements
    var tap = new UITapGestureRecognizer ();
    tap.AddTarget (() =>{ this.View.EndEditing(true); });

    this.View.AddGestureRecognizer (tap);
//-------------------------------------------------------


and another solution from stack overflow 

//Hide when dragging start
this.TableView.DraggingStarted += (object sender, EventArgs e) => 
{
   this.View.EndEditing (true);
};

The problem with these two is that it will block any action that comes from 
tapping other elements
(example. StringElement) so I can't find a way if using these two to display 
picker element, or UIAlertView.

Do you have any ideas?

Thanks for help!
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to