I encountered an annoying error in my Windows Phone 8.1 Runtime application. The error occurs when I defined my CommandBar on my page. This bar has been there almost since the creation of the application, but now the designer decided to make it a mistake. It reports an error like "The value is not in the expected range." Here is the code:
<Page.BottomAppBar>
<CommandBar x:Name="ButtonBar" Background="{StaticResource StrikeDistanceThemeBrush}" Foreground="{StaticResource StrikeDistanceForegroundBrush}" BorderBrush="White">
<CommandBar.SecondaryCommands>
<AppBarButton x:Name="SettingsButton" Label="settings" Click="SettingsButton_Click"/>
<AppBarButton x:Name="AboutButton" Label="about" Click="AboutButton_Click"/>
<AppBarButton x:Name="AppsButton" Label="more apps"/>
<AppBarButton x:Name="RateButton" Label="rate+review"/>
</CommandBar.SecondaryCommands>
<AppBarButton x:Name="CalculateButton" Label="calculate" Click="CalculateButton_Click" Icon="Calculator"/>
<AppBarButton x:Name="ClearAllButton" Icon="Clear" Label="clear all" Click="ClearAllButton_Click"/>
<AppBarButton x:Name="HelpButton" Icon="Help" Label="help"/>
</CommandBar>
</Page.BottomAppBar>
In addition, the CommandBar appears during debugging of the application, except that items that are normally pushed (for example, an AdDuplex control) do not move. So far, these have failed :
- Reboot Visual Studio
- Restart the computer.
- Create a new CommandBar
Thank you for your help!