IsEnabled="False" in ToolbarItem crashes the app on the device #14907
Unanswered
markhodg1972
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discovered after MANY hours of head scratching that if you have ToolBarItems in a XAML file:
<ContentPage.ToolbarItems> <ToolbarItem x:Name="EyeButton" IconImageSource="eye24.png" Clicked="EyeClicked" IsEnabled="False"/> <ToolbarItem x:Name="BurgerButton" IconImageSource="burger24.png" Clicked="BurgerClicked" IsEnabled="False"/> </ContentPage.ToolbarItems>
The app will run quite happily through the debugger, but when you try and run it standalone on an Android it crashes the app before the page is displayed.
It is absolutely fine to remove the IsEnabled="False" in the XAML and set it programatically.
Not a request for help, just an observation to hopefully help others if this happens to them :-)
Beta Was this translation helpful? Give feedback.
All reactions