Replies: 1 comment
-
As a workaround I moved the behavior out of XAML and into C# and that seems tow solve it. No idea why: StatusBarBehavior StatusBar;
public MyPage(...)
{
InitializeComponent();
StatusBar = new StatusBarBehavior();
StatusBar.StatusBarStyle = CommunityToolkit.Maui.Core.StatusBarStyle.LightContent;
this.Behaviors.Add(StatusBar);
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have upgraded to the latest version of community toolkit:
This runs fine on Android, but on iOS I get:
Microsoft.Maui.Controls.Xaml.XamlParseException: 'Position 20:10. No parameterless constructor defined for type 'CommunityToolkit.Maui.Behaviors.StatusBarBehavior'.'
This is my xaml:
As explained on the release notes:
I'm not sure if I need to run the .NET Maui workload since I am using the latest version of Visual Studio.
When I run my app on my iPhone, I get my app's splash screen but when it goes to the main page where my StatusBarBehavior is added, I get this exception:
Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions