Created
January 8, 2018 15:59
-
-
Save juucustodio/4ea71f5523a2c0829afca7d6b225be75 to your computer and use it in GitHub Desktop.
ButtonWithBadge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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