locked
IsOpen property not working in CommandBar RRS feed

  • Question

  • Windows Phone 8.1 uses CommandBar from Windows 8.1. It is in opened state by default. I want it in minimized mode. So I try to find the mode property, it is not available. Then I set IsOpen="false" but it has no effect. Moreover, command bar renders in a weird way. First page gets loaded and then command bar gets rendered meanwhile whole UI shifts to upward to make space for it. Why it's not opening on top the screen content, why it requires separate space?

    One more issue is related to bitmap icon in AppBarButton. I am using 28x28 icon with transparent & white color only. in XAML design view it looks good. But when I run the icon gets stretched. I also tried to set height-width to 20, but there's no effect of it. So how to overcome this?

    • Edited by Xyroid Thursday, July 3, 2014 12:31 PM
    Thursday, July 3, 2014 9:33 AM

Answers

  • On Windows Phone 8.1 the CommandBar will always show the icons for the PrimaryCommands.  (Windows Phone 8.1 does not have the swipe in from bezel gesture.)

    IsOpen and the Opened/Closed events in this context relate to visibility of the SecondaryCommands.

    Also, images used for BitmapIcon, on Windows Phone, should be 48x48 with the foreground portion of the graphic fitting in the center 26x26 pixels.


    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast your votes for existing suggestions.

    • Marked as answer by Xyroid Tuesday, July 15, 2014 10:28 AM
    Thursday, July 3, 2014 2:45 PM

All replies

  • On Windows Phone 8.1 the CommandBar will always show the icons for the PrimaryCommands.  (Windows Phone 8.1 does not have the swipe in from bezel gesture.)

    IsOpen and the Opened/Closed events in this context relate to visibility of the SecondaryCommands.

    Also, images used for BitmapIcon, on Windows Phone, should be 48x48 with the foreground portion of the graphic fitting in the center 26x26 pixels.


    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast your votes for existing suggestions.

    • Marked as answer by Xyroid Tuesday, July 15, 2014 10:28 AM
    Thursday, July 3, 2014 2:45 PM
  • Thanks Eric for quick reply. Any way to hide/minimize the command bar like WP 8?
    Friday, July 4, 2014 6:14 AM