OYIon / LiveSharp

Public repository for the LiveSharp project
96 stars 4 forks source link

Exception on save when code contains assignment to field on page #7

Closed VincentH-Net closed 6 years ago

VincentH-Net commented 6 years ago

.Invoke(g => { scrollingGrid = g; }) , where scrollingGrid is a field on the page, gives:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Expression of type 'System.Func2[Xamarin.Forms.Grid,Xamarin.Forms.Grid]' cannot be used for parameter of type 'System.Action1[Xamarin.Forms.Grid]' of method 'Xamarin.Forms.Grid InvokeGrid' Parameter name: arg1

VincentH-Net commented 6 years ago

A possible workaround is: .Invoke(g => SetScrollingGrid(g))

ionoy commented 6 years ago

Should be fixed in 1.0.24