Ads Top

How to make AppBars in Visual Studio.

Make a new project for windows store and name it as AppBarr_Tutorial.
 From Solition  Explorer on your screen's left side Double Click on MainPage.xaml

Write following XAML code.

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <TextBlock Text="Right Click will show you Top and Bottom AppBars"
                 VerticalAlignment="Center"
                 HorizontalAlignment="Center"
                 FontSize="50"/>       
    </Grid>
   
    <!--The code below Leads user to app bars -->
    <Page.TopAppBar>
        <CommandBar>
            <AppBarButton Icon="Add" Label="Add"></AppBarButton>
            <AppBarButton Icon="Delete" Label="Delete"></AppBarButton>
        </CommandBar>       
    </Page.TopAppBar>
    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton Icon="Admin" Label="Admin"/>
            <AppBarButton Icon="Calculator" Label="Calculator"/>
        </CommandBar>
    </Page.BottomAppBar>

Here is how your code will execute.



No comments:

Powered by Blogger.