Я использую Xamarin.Forms4.7.0.1080 для разработки приложения UWP, и я встречал System.NullReferenceException, если свойство «ImageSource» кнопки установлено. Исключение:
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()
Кнопка в xaml:
<Button
Padding="0"
BackgroundColor="#FFC0E0F4"
BorderWidth="0"
CornerRadius="0"
ImageSource="{Binding IconIndex,Converter={StaticResource ResourceConverter}}"
IconPosition="Top"
Text="{Binding Name}"
TextColor="#FF014C7A" />
Я нашел это https://github.com/xamarin/Xamarin.Forms/issues/1423, но я все еще не могу решить свою проблему. пожалуйста, помогите мне.