stretch my buttons in a TopAppBar

1 posts, 0 answers
  1. Imen
    Imen avatar
    8 posts
    Member since:
    Oct 2015

    Posted 27 Nov 2015 Link to this post

    Hi,
    I am developping a universal application in visual studio 2015 Community,but I have a problem in stretching my 3 buttons when I test my application on local PC or the windows phone emulator,this what I get whith my code:

    <CommandBar Height="51" >
                <CommandBar.Content>
                    <Grid>
                        <StackPanel>
                            <Image x:Name="image1" Height="37" Width="127" Margin="41,10,-168,-50" Source="images/name.png" RenderTransformOrigin="0.487,0.82"/>
                            <Image x:Name="image" Height="49" Width="39" Margin="1,0,-40,-50" Source="images/icon.png"/>
                        </StackPanel>
                        <StackPanel>
                            <Button  Height="49" Margin="0,0,-244,0" Width="35" HorizontalAlignment="Right" VerticalAlignment="Stretch">
                                <Button.Content>
                                    <Image Source="images/home.png" Margin="-9,0.333,-9,-0.667"/>
                                </Button.Content>
                            </Button>
                        </StackPanel>
                        <StackPanel>
                            <Button  Height="49" Margin="0,0,-280,0" Width="35" HorizontalAlignment="Right" VerticalAlignment="Stretch">
                                <Image Source="images/search.png" Margin="-9,0.333,-9,-0.667"/>
                            </Button>
                        </StackPanel>
                        <StackPanel>
                            <Button  Height="49" Margin="0,0,-315,0" Width="35" HorizontalAlignment="Right" VerticalAlignment="Stretch">
                                <Image Source="images/profil.png" Margin="-9,0.333,-9,-0.667"/>
                            </Button>
                        </StackPanel>
                    </Grid>
     
                </CommandBar.Content>

    this what I want to get :(attach file)

    thanks for help

     

Back to Top