I got this exception when subscribing to an observable : Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.
Here is the sample code :
var dataGridCopy = Observable.Merge(dataGridKeyDown, dataGridKeyUp)
.Buffer(2, 1)
.Where(x => !x[0].EventArgs.KeyStatus.IsKeyReleased && !x[1].EventArgs.KeyStatus.IsKeyReleased)
.Where(x => x[0].EventArgs.VirtualKey == VirtualKey.Control && x[1].EventArgs.VirtualKey == VirtualKey.C);
dataGridCopy.Subscribe(_ =>
{
// TODO
});
I am working on a UWP application under Windows 10 Fall Creators Update with the package System.Reactive 3.1.1.
@Odonno are you able to provide a more complete example? It's not clear where dataGridKeyDown and dataGridKeyUp are coming from, and this is a common error on StackOverflow around creating certain kinds of delegates
Of course. Hope it helps.
What was the solution for this? I'm having this issue as well.
@chrisevans9629 Well, rxjs with electron was the final solution. :)
But seriously, still don't know why..
For me, this happened when using Observable.FromEvent<>(); in Rx.NET
However, it worked fine after I switched to Observable.FromEventPattern<>():
Don't know why, but it did the trick!