You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicMainPageViewModel(){ObservableCollection<MaterialMenuItem>actions=newObservableCollection<MaterialMenuItem>();actions.Add(newMaterialMenuItem(){Text="Details"});actions.Add(newMaterialMenuItem(){Text="Edit"});actions.Add(newMaterialMenuItem(){Text="Upload Document"});actions.Add(newMaterialMenuItem(){Text="Add Project"});Actions=newObservableCollection<MaterialMenuItem>(actions);}privateObservableCollection<MaterialMenuItem>_actions{get;set;}publicObservableCollection<MaterialMenuItem>Actions{
get =>_actions;set{_actions=value;OnPropertyChanged(nameof(Actions));}}
Configuration
Visual Studio for Mac 2022 Version 17.0.1 (build 72)
Version: 1.x
XF.Material - 1.8.0
Platform:
📱 iOS
🤖 Android
🏁 WPF
🌎 UWP
🍎 MacOS
📺 tvOS
🐒 Xamarin.Forms
Exception Message: Cannot show menu, property Choices is null or has no items
Stack Trace
at XF.Material.Forms.UI.MaterialMenuButton.OnViewTouch (System.Double x, System.Double y) [0x0002c] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\UI\MaterialMenuButton.cs:131
at XF.Material.iOS.Renderers.MaterialMenuRenderer.OnClick () [0x0001b] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\Platforms\Ios\Renderers\MaterialMenuRenderer.cs:26
at Xamarin.Forms.Command+<>c__DisplayClass4_0.<.ctor>b__0 (System.Object o) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Command.cs:74
at Xamarin.Forms.Command.Execute (System.Object parameter) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Command.cs:112
at XF.Material.Forms.UI.MaterialIconButton.OnButtonClicked (System.Boolean handled) [0x00017] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\UI\MaterialIconButton.xaml.cs:145
at XF.Material.Forms.UI.MaterialMenuButton.OnButtonClicked (System.Boolean handled) [0x00000] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\UI\MaterialMenuButton.cs:120
at XF.Material.Forms.UI.MaterialIconButton.<.ctor>b__13_0 () [0x00000] in Z:\Documents\OpenSource\XF-Material-Library\XF.Material\UI\MaterialIconButton.xaml.cs:47
at Xamarin.Forms.Command+<>c__DisplayClass4_0.<.ctor>b__0 (System.Object o) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Command.cs:74
at Xamarin.Forms.Command.Execute (System.Object parameter) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Command.cs:112
at Xamarin.Forms.ButtonElement.ElementClicked (Xamarin.Forms.VisualElement visualElement, Xamarin.Forms.Internals.IButtonElement ButtonElementManager) [0x00008] in D:\a\1\s\Xamarin.Forms.Core\ButtonElement.cs:60
at Xamarin.Forms.Button.SendClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:173
at Xamarin.Forms.Platform.iOS.ButtonElementManager.OnButtonTouchUpInside (Xamarin.Forms.IButtonController element) [0x00009] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ButtonElementManager.cs:86
at Xamarin.Forms.Platform.iOS.ButtonRenderer.OnButtonTouchUpInside (System.Object sender, System.EventArgs eventArgs) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\ButtonRenderer.cs:189
at UIKit.UIControlEventProxy.Activated () [0x00004] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIControl.cs:38
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:75
at solarcrm.Application.Main (System.String[] args) [0x0001b] in /Users/divyeshbhatt/Documents/sourcetree/APS/src/solarcrm.Mobile.iOS/Main.cs:20
The text was updated successfully, but these errors were encountered:
Thanks for your answer, sadly it did not change anything.
No matter which version of Xamarin.Fomrs i use.
The strange thing is, that it works in some situation and in some it does not work.
I can not really determine whats the problem, the data that gets provided is always the same (List)
🐛 Bug Report
Expected behavior
Reproduction steps
MainPage.xaml
MainPageViewModel.cs
Configuration
Version: 1.x
Platform:
Stack Trace
The text was updated successfully, but these errors were encountered: