ARTICLE AD BOX
I am using .NET MAUI and have created a navbar for Android. Currently, it's only a visual design. I want to make it functional so it can be used to navigate between the different pages.
How can I implement this?
Below is my HomePage.xaml file.
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Project.HomePage" BackgroundColor="#D7D7D7"> <!-- Page Grid --> <Grid RowDefinitions="0.15*, 0.75*, 0.10*" RowSpacing="20"> <!-- Top Card --> <Border Grid.Row="0" BackgroundColor="White" Padding="20" StrokeThickness="0"> <Border.StrokeShape> <RoundRectangle CornerRadius="0,0,30,30"/> </Border.StrokeShape> <Border.Shadow> <Shadow Offset="0,4" Radius="12" Opacity="0.12"/> </Border.Shadow> <!-- REDACTED --> </Border> <Grid Grid.Row="1"> <!-- REDACTED --> </Grid> <Grid Grid.Row="2" HeightRequest="85"> <Border BackgroundColor="White" Margin="10" StrokeThickness="0"> <Border.StrokeShape> <RoundRectangle CornerRadius="20"/> </Border.StrokeShape> <Border.Shadow> <Shadow Brush="Black" Offset="0,-4" Radius="12" Opacity="0.1"/> </Border.Shadow> </Border> <HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Center" Spacing="0"> <VerticalStackLayout Spacing="4" Padding="16,8"> <Image Source="home.svg" HeightRequest="26" WidthRequest="26"/> <Label Text="Home" TextColor="#007AFF" FontSize="13" FontFamily="SofiaSansBold" HorizontalTextAlignment="Center"/> </VerticalStackLayout> <VerticalStackLayout Spacing="4" Padding="16,8"> <Image Source="activity.svg" HeightRequest="26" WidthRequest="26"/> <Label Text="Activity" TextColor="#8E8E93" FontSize="13" FontFamily="SofiaSansRegular" HorizontalTextAlignment="Center"/> </VerticalStackLayout> <VerticalStackLayout Spacing="4" Padding="16,8"> <Image Source="add_device.svg" HeightRequest="26" WidthRequest="26"/> <Label Text="Add device" TextColor="#8E8E93" FontSize="13" FontFamily="SofiaSansRegular" HorizontalTextAlignment="Center"/> </VerticalStackLayout> <VerticalStackLayout Spacing="4" Padding="16,8"> <Image Source="support.svg" HeightRequest="26" WidthRequest="26"/> <Label Text="Support" TextColor="#8E8E93" FontSize="13" FontFamily="SofiaSansRegular" HorizontalTextAlignment="Center"/> </VerticalStackLayout> <VerticalStackLayout Spacing="4" Padding="16,8"> <Image Source="profile.svg" HeightRequest="26" WidthRequest="26"/> <Label Text="Profile" TextColor="#8E8E93" FontSize="13" FontFamily="SofiaSansRegular" HorizontalTextAlignment="Center"/> </VerticalStackLayout> </HorizontalStackLayout> </Grid> </Grid> </ContentPage>8,37123 gold badges34 silver badges47 bronze badges
1
Explore related questions
See similar questions with these tags.
