Issue
I am using Xamarin.Forms4.7.0.1080 to develop a UWP application and i met a System.NullReferenceException if the property "ImageSource" of Button is set. The Exception:
System.NullReferenceException(Object reference not set to an instance of an object.)
at Xamarin.Forms.Platform.UWP.ButtonRenderer.<UpdateContent>d__19.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object state)
at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()
The Button in xaml:
<Button
Padding="0"
BackgroundColor="#FFC0E0F4"
BorderWidth="0"
CornerRadius="0"
ImageSource="{Binding IconIndex,Converter={StaticResource ResourceConverter}}"
IconPosition="Top"
Text="{Binding Name}"
TextColor="#FF014C7A" />
I found this https://github.com/xamarin/Xamarin.Forms/issues/1423, but i still can not solve my problem. please help me.
Solution
After updating Xamarin.Forms to version 4.8.0.1451, this Exception never appeared again.
Answered By - user13431110
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.