2

I got a CommandBar i'd like to use for all my pages within the app. When creating a new command bar using the 'New' button in the properties window and converting the new value to a resource using 'Convert to New Resource' (the resource is placed in a resource dictionary) VS creates the following xaml:

<Page.BottomAppBar>
    <StaticResource ResourceKey="BottomBar" />
</Page.BottomAppBar>

Resource dict.:

<CommandBar x:Key="BottomBar" />

Now when launching the application an unhandled exception with the message 'The parameter is incorrect' is thrown (inner exception: 'Value does not fall within the expected range'). Is that intended behaviour or is there a workaround (except for using a style)?

Streamline
  • 952
  • 1
  • 15
  • 23
  • I'm also stuck here. The full exception says `Exception {System.Exception: The request is not supported. CommandBars can only be set in Page.BottomAppBar.}` Creating CommandBar in code behind and assigning it to BottomAppBar works just fine. – Michael Antipin Feb 19 '16 at 14:25

0 Answers0