Sub btnCancelEvent_Click
Dim callee As Button = Sender
Log(callee.Text)
' Dim bagdeNumber() As Int
' For Each ln As Notification In App.GetScheduledNotifications
' bagdeNumber = callee.Tag
' If ln.IconBadgeNumber = bagdeNumber(0) Then
' ln.Cancel
' End If
' Next
For x = 0 To buttons.Length - 2
If callee = buttons(x) Then
Log("found button")
callee.Enabled = False
Dim ln As Notification = alerts(x)
If x Mod 2 = 1 Then
ln.Cancel ' Does not cancel notification
'ln.Register ' OK. I got desperate here
Else
Dim no1 As NativeObject = App
Dim no2 As NativeObject = ln
no1.RunMethod("cancelLocalNotification", Array (no2)) ' blows up!!!!!
'Method not found: cancelLocalNotification, target: <UIApplication: 0x133904800>
End If
Exit
End If
Next
updateUI
End Sub