Search code examples
wpfuwpcommandbar

Can we customize CommandBar in UWP


I have a UWP app. There, I have one CommandBar which has some AppBarButton. Now, I need to add some customized radio button in the same command bar and these radio buttons will be grouped together and shown exactly in the middle of the command bar (not right aligned like it does as the default behavior).

Is there a way to achieve it using the CommandBar?


Solution

  • Yes, you can. Look at the official sample. In sample you can find a lot of combinations how use app bar in your UWP Application

    UPDATE:

    <Page.BottomAppBar>
        <CommandBar>
            <CommandBar.Content>
                <Grid> 
                    <RadioButton />
                 ...  
    

    p.s. don't forget for HorizontalAlignment and HorizontalContentAlignment property