I've run across an annoying error in my Windows Phone 8.1 Runtime app. The error occurs where I defined my CommandBar on my page. That bar has been there almost since the creation of the app, but now the designer decided to make it an error. It reports the error as "Value does not fall within the expected range". Here is the code:
<Page.BottomAppBar>
<!-- ERROR STARTS HERE --><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><!-- ERROR ENDS HERE -->
</Page.BottomAppBar>
Also, the CommandBar does appear while debugging the app, except elements that typically get nudged up (such as my AdDuplex control) don't get moved. So far, these things haven't resolved the problem:
- Visual Studio restart
- Computer restart
- Creating a new CommandBar
Thanks for your help!