ButtonWithBadge
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:BadgeView" | |
x:Class="BadgeView.MainPage"> | |
<ContentPage.Content> | |
<StackLayout BackgroundColor="DarkGray" | |
HeightRequest="35" VerticalOptions="Center"> | |
<StackLayout.GestureRecognizers> | |
<TapGestureRecognizer Tapped="AddNotification"/> | |
</StackLayout.GestureRecognizers> | |
<StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="Center"> | |
<Label HorizontalTextAlignment="Center" Text="Notifications" FontSize="18" TextColor="White"/> | |
<local:Badge x:Name="BadgeNotifications" BoxColor="red" | |
WidthRequest="18" HeightRequest="18" | |
VerticalOptions="Center" HorizontalOptions="Center"> | |
<x:Arguments> | |
<x:Double>30</x:Double> | |
<x:Double>10</x:Double> | |
</x:Arguments> | |
</local:Badge> | |
</StackLayout> | |
</StackLayout> | |
</ContentPage.Content> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment