Is it possible to add an Rx event handling method to wp7 ApplicationBar item. I tried the below mentioned code but getting a null reference exception. Please help me to avoid this issue.
var res = Observable.FromEvent<EventArgs>(button1, "Click")
.SubscribeOn(Scheduler.ThreadPool)
.Throttle(TimeSpan.FromMilliseconds(230))
.Subscribe(
_ => {
++i;
Debug.WriteLine("Clicked{0}", i);
}
);
SchedulerorScheduler.ThreadPoolor some other bit of the puzzle is null. You have to figure that part out (call stack, inner exceptions usually help). Solution: Do it later. - user1228