Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Problem with the action sheet

$
0
0

i created an action sheet with 4 buttons and then i try to get handle the click using this code

btn.TouchUpInside += (sender, e) => { actionSheetSort = new UIActionSheet ("Filter "); actionSheetSort.AddButton ("button1"); actionSheetSort.AddButton ("button2"); actionSheetSort.AddButton ("button3"); actionSheetSort.AddButton ("button4"); actionSheetSort.CancelButtonIndex = 3;

actionSheetSort.Clicked += delegate(object a, UIButtonEventArgs b) { Console.WriteLine ("Button " + b.ButtonIndex.ToString () + " clicked"); }; actionSheetSort.ShowInView (View); };

when i try to write a switch statement which uses the button index to decide what action to take it doesn't work. but if i try to write a console statement , that works fine


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>