Closed tyronemagwade closed 11 months ago
@tyronemagwade I'm not sure what may be wrong here. I tried a XAML Popup example and it worked. Next update (3.1.58) should improve stack traces and potentially help here.
@radimitrov I'm still get the same exception after updating. Do you mind if you show me how you tested it
@tyronemagwade
@radimitrov thanks it's working. I found the main reason why it was throwing exception, it need to have views/children inside it
I tried implementing a built in Popup. It keeps on throwing this exceptionb__0(IElementHandler h, IElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view)
at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at CommunityToolkit.Maui.Views.PopupExtensions.CreatePopup(Page page, Popup popup)
at CommunityToolkit.Maui.Views.PopupExtensions.CreateAndShowPopup[NotesPopup](Page page, NotesPopup popup)
at CommunityToolkit.Maui.Views.PopupExtensions.ShowPopup[NotesPopup](Page page, NotesPopup popup)
at Church.Views.ProfilePage.OnItemSelected(Object sdr, EventArgs e)
at System.Threading.Tasks.Task.<>c.b 128_0(Object state)
at Android.App.SyncContext.<>cDisplayClass2_0.b__0()
at Java.Lang.Thread.RunnableImplementor.Run()
at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native this)
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz)`
System.ArgumentNullException: Value cannot be null. (Parameter 'handler.Container') at CommunityToolkit.Maui.Core.Handlers.PopupHandler.MapSize(PopupHandler handler, IPopup view) at Microsoft.Maui.PropertyMapper
2.<>cDisplayClass5_0[[CommunityToolkit.Maui.Core.IPopup, CommunityToolkit.Maui.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[CommunityToolkit.Maui.Core.Handlers.PopupHandler, CommunityToolkit.Maui.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].