Tom Red
Tom Red

Reputation: 91

How to make the CommandBar point down in UWP

The CommandBar expands upward when the button is pressed. How to make the CommandBar expand in the opposite direction?

enter image description here

Code:

     <CommandBar>
        <AppBarToggleButton Icon="Shuffle" Label="Shuffle" />
        <AppBarToggleButton Icon="RepeatAll" Label="Repeat"/>
        <AppBarSeparator/>
        <AppBarButton Icon="Back" Label="Back" />
        <AppBarButton Icon="Stop" Label="Stop" />
        <AppBarButton Icon="Play" Label="Play" />
        <AppBarButton Icon="Forward" Label="Forward"/>
        
        <CommandBar.Content>
            <TextBlock Text="Now playing..." Margin="12,14"/>
        </CommandBar.Content>
    </CommandBar>

Upvotes: 1

Views: 214

Answers (1)

mm8
mm8

Reputation: 169200

You should edit the ControlTemplate as suggested here.

There is a full code example available on GitHub:

<CommandBar Style="{StaticResource OpenDownCommandBar}">
    <CommandBar.Content>
        ...
    </CommandBar.Content>
</CommandBar>

Upvotes: 1

Related Questions