GithubHelp home page GithubHelp logo

wilsonvargas / buttoncircleplugin Goto Github PK

View Code? Open in Web Editor NEW
95.0 6.0 18.0 1.79 MB

Circle Buttons with icon for your Xamarin.Forms Applications

License: MIT License

C# 94.87% PowerShell 3.64% Shell 1.46% Batchfile 0.02%
xamarin-forms xamarin plugin nuget c-sharp pcl xamarin-plugin xaml circle-button

buttoncircleplugin's Introduction

Button Circle Control Plugin for Xamarin.Forms

Simple but elegant way of display circle buttons with an icon in your Xamarin.Forms projects.

Build status NuGet Donate

image

Setup

Android

In your Android project call:

ButtonCircleRenderer.Init();

iOS

In your iOS project call:

ButtonCircleRenderer.Init();

In your iOS project add materialicons.ttf and fontawesome.ttf files to:

Resources

You can download the files here:

Material Design icons

FontAwesome

And add this key in your Info.plist

<key>UIAppFonts</key>
    <array>
      <string>materialicons.ttf</string>
      <string>fontawesome.ttf</string>
      <string>ionicons.ttf</string>
    </array>

UWP

In your UWP project add materialicons.ttf and fontawesome.ttf files to:

Assets/Fonts

You can download the files here:

Material Design icons

FontAwesome

Ionic

Also call Init method:

ButtonCircleRenderer.Init();

You must do this AFTER you call Xamarin.Forms.Init();

Note: On UWP, the button's fill color on hover will be a lighter shade of the background color set on the CircleButton, unless it is transparent (which will be the assumed default if no BackgroundColor is explicitly set) in which case the BorderColor will be used.

Image

Platform Support

Platform Supported Version
Xamarin.iOS Yes iOS 7+
Xamarin.Android Yes API 14+
Windows 10 UWP Yes Build 105086+
Xamarin.Mac No

List of icons

You can see name of icons for FontAwesome here and for Material design icon here

Usage

Instead of using an Button simply use a CircleButton instead!

You MUST set the width & height requests to the same value. Here is a sample:

new ButtonImage
{
  BorderColor = Color.Black,
  BorderThickness = 5,
  HeightRequest = 150,
  WidthRequest = 150,
  HorizontalOptions = LayoutOptions.Center,
  FontIcon = Fonts.Material
  Icon = "md-add"
}

XAML:

First add the xmlns namespace:

xmlns:local="clr-namespace:ButtonCircle.FormsPlugin.Abstractions;assembly=ButtonCircle.FormsPlugin.Abstractions"

Then add the xaml:

<local:CircleButton 
        FontIcon="Material"
        Icon="md-directions-bike" 
        FontSize="30" TextColor="Black" 
        HeightRequest="70" WidthRequest="70" 
        BorderThickness="5" BorderColor="Black" 
        BackgroundColor="#DCDCDC">
</local:CircleButton>

If you see the replacement character (�) appear instead of the desired icon, make sure that you have followed the setup instructions above and that you have supplied the correct text key for the "Icon" property.

License

Licensed under MIT, see license file

buttoncircleplugin's People

Contributors

agrigg avatar deanfaizal avatar mzhukovs avatar wilsonvargas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

buttoncircleplugin's Issues

Rectangle button on Android 6.0 - API 23

Button becomes a rectangle instead of square when run on my Samsung A5 Android 6.0 - API 23. It displays properly on android emulator, but when I plug it and debug it on my phone it is a rectangle.

This is the code I use:

    <ContentPage.Content>
        <StackLayout>
            <Grid VerticalOptions="CenterAndExpand">
                <test:CircleButton FontIcon="Material"
                                   Icon="md-play-arrow" 
                                   FontSize="30" TextColor="White" 
                                   HeightRequest="70" WidthRequest="70" 
                                   BorderThickness="0" BorderColor="Black" 
                                   BackgroundColor="#455A64" Command="{Binding PlayButtonClickedCommand}"></test:CircleButton>
            </Grid>
        </StackLayout>
    </ContentPage.Content>

And here is what it looks like

screenshot_2018-07-29-12-46-28

Defect with binding the Icon property (and a solution provided below)

Here is the solution to the defect

I have noticed that the Icon property in the file [ButtonCirclePlugin / src / ButtonCircle / ButtonCircle.FormsPlugin.Abstractions / CircleButton.cs ] has a typo as below

48 ///


49 /// Property definition for the Property
50 ///

51 public static readonly BindableProperty IconProperty =
52 BindableProperty.Create(propertyName: nameof(BorderColor),
53 returnType: typeof(Icons),
54 declaringType: typeof(CircleButton),
55 defaultValue: Icons.ic_default);

where the BorderColor is probably a cut-paste error and it should read Icon instead

Would love to see this fix make it to a new build

BTW: Thank you for a great control...

Saad ([email protected])

Problem with references

No se encontró el tipo 'local:CircleButton'. Compruebe que no falta una referencia a un ensamblado y que se han compilado todos los ensamblados a los que se hace referencia.

No button pressed effect when using image

I'm using .png file as button image, but there is no button click effect when the button is clicked. Below is my code, any help would be appreciated.
<Grid Grid.Row="0" Grid.Column="0" HorizontalOptions="Center" VerticalOptions="Center"> <Grid.RowDefinitions> <RowDefinition Height="70"/> <RowDefinition Height="70"/> <RowDefinition Height="70"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="70"/> <ColumnDefinition Width="70"/> <ColumnDefinition Width="70"/> </Grid.ColumnDefinitions> <controls:CircleButton Image="test1_70x70.png" HorizontalOptions="Center" Grid.Row="0" Grid.ColumnSpan="3" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BorderThickness="5" Clicked="CircleButton_Clicked"/> <controls:CircleButton Image="test2_70x70.png" FontSize="30" Grid.Row="1" Grid.Column="0" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BorderThickness="5" Clicked="CircleButton_Clicked"/> <controls:CircleButton Image="test3_70x70.png" FontSize="30" Grid.Row="1" Grid.Column="2" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BorderThickness="5" Clicked="CircleButton_Clicked"/> <controls:CircleButton Image="test4_70x70.png" HorizontalOptions="Center" Grid.Row="2" Grid.ColumnSpan="3" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BorderThickness="5" Clicked="CircleButton_Clicked"/> </Grid>

Does it work with .Net Standard 2.0?

I followed the exact steps in the example, the project builds but when it's loading the page (android) I get this exception:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.

Is the problem the fact that I am using .Net standard 2.0 instead of the older PCL?

Icon NullReferenceException

I have the following in XAML

<local:CircleButton WidthRequest="50" HeightRequest="50" x:Name="btnRegisterHorse" BorderColor="#1976D2" BackgroundColor="#1976D2" BorderRadius="20"></local:CircleButton>

and the following in CS
btnRegisterHorse.Icon = "register_foul.png";

Then it causes my app to crash with the following StackTrace StackTrace.txt

Button not round on iOS

Describe the bug
On the iOS Simulator, the button is not round but on Android the button is round

Screenshots
If applicable, add screenshots to help explain your problem.
iphone_8_-_12_0

I used the following code :

                <btn:CircleButton 
                    FontIcon="Material"
                    Icon="md-directions-bike" 
                    FontSize="30" TextColor="Black" 
                    CornerRadius="35"
                    HeightRequest="70" WidthRequest="70" 
                    BorderThickness="5" BorderColor="Black" 
                    BackgroundColor="#DCDCDC" />

Please complete the following information:

  • Which version of the ButtonCircle do you use? 2.0.3

  • Which version of Xamarin.Forms do you use? - 3.1.0.697729

  • Which OS are you talking about? - iOS

Pressed and released event doesn't get triggered?

Here is my code:
<controls:CircleButton Image="playstationcross_70x70.png" HorizontalOptions="Center" Grid.Row="3" Grid.ColumnSpan="3" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BackgroundColor="Black" Clicked="CrossButton_Clicked" Pressed="CrossButton_Pressed" Released="CrossButton_Released"

I added CrossButton_Pressed and CrossButton_Released but those 2 event never got triggered when I press the button.

Background not transparent on Android (it is white)

Hi, I'm using Xamarin.Forms 4.1.0.581479, and the background of the circle button is white instead of transparent. It worked fine before, not sure which update caused the problem. I noticed it on Android 8.1).

error in IOS

at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0002a] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000cc] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0002a] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <f321195339234cc7a2f7f1d5fa08167d>:0 at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr) at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2983 at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__45.MoveNext () [0x00016] in <f321195339234cc7a2f7f1d5fa08167d>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at Xamarin.Forms.Platform.iOS.NavigationRenderer+<b__40_0>d.MoveNext () [0x00067] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.2/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/Foundation/NSAction.cs:163
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at TestAppButtonCircle.iOS.Application.Main (System.String[] args) [0x00001] in /Volumes/Disco D/DescargasD/ButtonCirclePlugin-master/test/TestAppButtonCircle/TestAppButtonCircle.iOS/Main.cs:17

Target framework issue

Hi,

I get this build warning lately, is there some incompatibility?

Package 'Plugins.Forms.ButtonCircle 1.3.9' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Issues with RotateTo animation

When I configure a simple rotation animation like:

btn.RotateTo(360, 2000)

The animation appears completely different as expected, in a normal Button it rotates as expected. Any ideas why this could be happening? I've only tested it so far in Android 7 on a real device.

Unhandled Exception while using FontAwesomeWeb (ttf) version 5.3.1

Describe the bug
Hi @wilsonvargas, thank you for helping us with this great plugin.
To make use of font icons from the latest version (53.1) of FontAwesomeWeb (ttf) filesI updated the my App's info.plist file as below.

fa-solid-900.ttf
fa-regular-400.ttf
fa-brands-400.ttf
MaterialIcons-Regular.ttf

But while testing my changes with ButtonCirclePlugin using FontAwesomeWeb v5.3.1 I am getting unhandled exception error as shown below.

Can you please confirm if your codebase is tied only to your version of the Font Awesome and Material ttf files?
<cFAB:CircleButton
IsVisible="True"
Grid.Row="0"
Grid.Column="1"
x:Name="fabRound"
FontIcon="FontAwesome" <=== this is a as is enum from your code. How does it read
the key value from about updates in the info.plist?
It doesn't throw any error when using around
MaterialIcon even when my value in the info.plist is
as shown above

Icon="fa-bed"
FontSize="15"
TextColor="WhiteSmoke"
HeightRequest="35"
WidthRequest="35"
BorderThickness="5"
BorderColor="Red"
BackgroundColor="White"
Clicked="Clicked"/>

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...' Download latest FontAwesomeWeb v5.3.1 font file

  2. Click on '....' unzip the downloaded file. Copy all 3 ttf files from {downloadfolder\fontawesome-free-5.3.1-web\fontawesome-free-5.3.1-web\webfonts} in your iOS app's resources folder.
    Use https://github.com/smourier/FontAwesomeEnum to create a fontAwesomeWeb Enum class.
    I have a attached .cs file that has new enums and literals defined for version 5.3.1. Remove the .txt extension to get to .cs file.
    FontAwesomeWeb531Font.cs.txt

  3. Scroll down to '....' Update your info.plist as shown above
    3.1 in App.xaml include following resource declarations

    <Application.Resources>

     <ResourceDictionary>
         <OnPlatform 
     		x:Key="FontAwesomeWeb531SIconsFontFamily" 
             x:TypeArguments="x:String"
     		Android="fa-solid-900.ttf#FontAwesome5FreeSolid"
     		iOS="FontAwesome5FreeSolid" />
    
         <OnPlatform 
     		x:Key="FontAwesomeWeb531RIconsFontFamily" 
             x:TypeArguments="x:String"
     		Android="fa-regular-400.ttf#FontAwesome5FreeRegular"
     		iOS="FontAwesome5FreeRegular" />
    
         <OnPlatform 
     		x:Key="FontAwesomeWeb531BFontFamily" 
             x:TypeArguments="x:String"
     		Android="fa-brands-400.ttf#FontAwesome5BrandsRegular"
     		iOS="FontAwesome5BrandsRegular" />
    
         <OnPlatform 
     		x:Key="MaterialIOIconFontFamily" 
             x:TypeArguments="x:String"
     		Android="MaterialIcons-Regular.ttf#MaterialIcons-Regular"
     		iOS="MaterialIcons-Regular" />
    
           </ResourceDictionary>
     </Application.Resources>
    
  4. See error - see the screenshot below

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Please complete the following information:

  • Which version of the ButtonCircle do you use? 2.0.3
  • Which version of Xamarin.Forms do you use? 3.2 pre2
  • Which OS are you talking about? iOS 11.14

Thanks

BackgroundColor not applied when binding to

Describe the bug
The BackgroundColor of the CircleButton does not get applied to the button when the button's still is bound to a derived style.

To Reproduce
I have the following style defined in my Application ResourceDictionary:

<Style x:Key="DashboardCircleButton" 
	 ApplyToDerivedTypes="True"
	 TargetType="btnCircle:CircleButton">
	<Setter Property="TextColor" Value="Black" />
	<Setter Property="HeightRequest" Value="70" />
	<Setter Property="WidthRequest" Value="70" />
	<Setter Property="BorderThickness" Value="3" />
	<Setter Property="BorderColor" Value="Black" />
	<Setter Property="HorizontalOptions" Value="Center" />
</Style>
<Style x:Key="DashboardCircleButtonOn" 
	   TargetType="btnCircle:CircleButton"
	   ApplyToDerivedTypes="True"
	   BasedOn="{StaticResource DashboardCircleButton}">
	<Setter Property="BackgroundColor" Value="LightGreen" />
	<Setter Property="TextColor" Value="LightGray" />
	<Setter Property="Text" Value="On" />
</Style>
<Style x:Key="DashboardCircleButtonOff" 
	   TargetType="btnCircle:CircleButton"
	   ApplyToDerivedTypes="True"
	   BasedOn="{StaticResource DashboardCircleButton}">
	<Setter Property="BackgroundColor" Value="OrangeRed" />
	<Setter Property="TextColor" Value="Black" />
	<Setter Property="Text" Value="Off" />
</Style>

In my ViewModel XAML, I have defined a CircleButton like this:

<btnCircle:CircleButton x:Name="GpsButton" Style="{StaticResource DashboardCircleButton}"
                                     HeightRequest="70" WidthRequest="70" />

In my code-behind file I am setting up a binding to the button's style like this (using ReactiveUI):

this.OneWayBind(ViewModel, x => x.IsGpsOn, x => x.GpsButton.Style, BoolToOnOffCircleButtonStyle);

The BoolToOnOffCircleButtonStyle returns either the DashboardCircleButtonOn or DashboardCircleButtonOff style, depending on the value of the property it is bound to.

Every property on the CircleButton is set correctly, except for the BackgroundColor (the button's background is white).

Expected behavior
The button's background should have the color which is defined in the style that is bound to it.
If I change the type of the button (and the targetType of the style accordingly) to a regular button, everything works as expected.

Please complete the following information:

  • Which version of the ButtonCircle do you use: 2.0.3
  • Which version of Xamarin.Forms do you use: 3.2.0.871581 (ReactiveUI: 9.0.1)
  • Which OS are you talking about: Multi-Platform solution testing UWP project

Master Detail view issue

After adding this plugin to my project, setting Detail to a page on my MainPage raises "Object reference not set to an instance of an object" exception:

this.Detail = new NavigationPage(page);

I've checked and can confirm that Detail and page are both initiated.

The stacktrace of the exception can be found below:

ButtonCircle.FormsPlugin.UWP.ButtonCircleRenderer.OnElementChanged(ElementChangedEventArgs1 e) at Xamarin.Forms.Platform.UWP.VisualElementRenderer2.SetElement(VisualElement element)
at Xamarin.Forms.Platform.UWP.VisualElementRenderer2.Dispose(Boolean disposing) at Xamarin.Forms.Platform.UWP.VisualElementRenderer2.Dispose()
at Xamarin.Forms.Platform.UWP.VisualElementExtensions.Cleanup(VisualElement self)
at Xamarin.Forms.Platform.UWP.NavigationPageRenderer.SetPage(Page page, Boolean isAnimated, Boolean isPopping)
at Xamarin.Forms.Platform.UWP.NavigationPageRenderer.Dispose(Boolean disposing)
at Xamarin.Forms.Platform.UWP.NavigationPageRenderer.Dispose()
at Xamarin.Forms.Platform.UWP.MasterDetailPageRenderer.ClearDetail()
at Xamarin.Forms.Platform.UWP.MasterDetailPageRenderer.UpdateDetail()
at Xamarin.Forms.Platform.UWP.MasterDetailPageRenderer.OnElementPropertyChanged(Object sender, PropertyChangedEventArgs e)
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at Xamarin.Forms.BindableObject.OnPropertyChanged(String propertyName)
at Xamarin.Forms.Element.OnPropertyChanged(String propertyName)
at Xamarin.Forms.MasterDetailPage.set_Detail(Page value)
at MyTestProject.Views.MainPage.ListView_ItemSelected(Object sender, SelectedItemChangedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Xamarin.Forms.ListView.OnSelectedItemChanged(BindableObject bindable, Object oldValue, Object newValue)
at Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent)
at Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes)
at Xamarin.Forms.ListView.NotifyRowTapped(Int32 groupIndex, Int32 inGroupIndex, Cell cell)
at Xamarin.Forms.ListView.NotifyRowTapped(Int32 index, Cell cell)
at Xamarin.Forms.Platform.UWP.ListViewRenderer.OnListItemClicked(Object sender, ItemClickEventArgs e)

Any help would be highly appreciated.

Thanks.

Grey square over the top

for some reason my circle has a grey square over the top of it like this

https://imgur.com/x6Zdd1l

my xaml is:

<CustomButton:CircleButton FontSize="30" TextColor="Black" HeightRequest="150" WidthRequest="150" BorderThickness="40" BorderColor="Black" />

[UWP] Default test project NullReferenceException

There is a NRE in ButtonCircle.FormsPlugin.UWP.dll on UWP platform.

To reproduce

  1. Run test solution in this project on a UWP device
  2. Navigate to second page through any button
  3. Navigate back to main page.
    Observe nullreferenceexception.
    Exception thrown: 'System.NullReferenceException' in ButtonCircle.FormsPlugin.UWP.dll

not work

hi
your plugin doesn't work in android 6

screenshot 3
this code is
<local:CircleButton
Icon="ic_directions_bike"
FontSize="30" TextColor="Black"
HeightRequest="70" WidthRequest="70"
BorderThickness="5" BorderColor="Black"
BackgroundColor="#DCDCDC" Clicked="CircleButton_Clicked">
</local:CircleButton>

Material and fontawsome images are underscored on iOS

Describe the bug
After update to XamarinForms 4.7 every image is underscored when using Materila or Fontawsome. Tried also on sample project with XamarinForms 4.5 and same happened. I updated from XamarinForms 3.4 where things still worked as intended.

To Reproduce
Just add CircelButton in any project with XamarinForms >= 4.5

Expected behavior
There shouldn't be any lines under the images.

Screenshots
IMG_0357

Please complete the following information:

  • Which version of the ButtonCircle do you use? 2.0.3
  • Which version of Xamarin.Forms do you use? 4.7.0 and tried on 4.5.0 with same results
  • Which OS are you talking about? iOS

Background when clicked

My code in xaml
local:CircleButton AbsoluteLayout.LayoutBounds=".95,.95,.15,.15" AbsoluteLayout.LayoutFlags="All" Image="icn_mais_24" BackgroundColor="#005F9C" Command="{Binding NovoDocumentoCommand}" TextColor="White" HeightRequest="70" WidthRequest="70" >

this xaml show correct Button :
whatsapp image 2018-05-21 at 15 07 12

but when i click on the Button it shows the borders

whatsapp image 2018-05-21 at 15 07 12 1

I think that occurs on the property backgroundColor, why when i take off this property, this problem don't occurs

any soluction ?

Value cannot be null - Parameter name: value - iOS

Hello, this error happen only in iOS, as I add CircleButton
xamarin form: 3.2.0.839982
Plugin versione: 2.0.3

In my iOS project I call in FinishedLaunching method:
ButtonCircleRenderer.Init();

And I add this key in my Info.plist:

<key>UIAppFonts</key>
    <array>
      <string>materialicons.ttf</string>
      <string>fontawesome.ttf</string>
    </array>

In my xaml page I add a simple CircleButton into a grid:

...
             xmlns:local="clr-namespace:ButtonCircle.FormsPlugin.Abstractions;assembly=ButtonCircle.FormsPlugin.Abstractions"
...

<local:CircleButton 
        FontIcon="Material" Grid.Row="2"
        Icon="md-directions-bike" 
        FontSize="30" TextColor="Red" 
        HeightRequest="70" WidthRequest="70" 
        BorderThickness="5" BorderColor="Black" 
        BackgroundColor="#DCDCDC">
</local:CircleButton>

The exception I have:
at UIKit.UIButton.set_Font (UIKit.UIFont value) [0x00058] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIButton.g.cs:765
at ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x00089] in <fbde11586d42451093d079a04c1c7b72>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x0012a] in <66855f87e3b64ff38a3e1034f86d8129>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000de] in <66855f87e3b64ff38a3e1034f86d8129>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <66855f87e3b64ff38a3e1034f86d8129>:0 at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr) at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIViewController.g.cs:2983 at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in <66855f87e3b64ff38a3e1034f86d8129>:0 at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__51.MoveNext () [0x0001d] in <66855f87e3b64ff38a3e1034f86d8129>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at Xamarin.Forms.Platform.iOS.NavigationRenderer+<b__46_0>d.MoveNext () [0x00069] in <66855f87e3b64ff38a3e1034f86d8129>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSAction.cs:178
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:63
at Score.iOS.Application.Main (System.String[] args) [0x00001] in /Progetti/vari/Score/Score/Score.iOS/Main.cs:17

ArgumentNullException when trying to use the font-based icons in iOS

Thank you for creating this plugin. The font-based icons are very convenient, but I can't get to run the button with them on iOS.

I am getting the following exception:

  at UIKit.UIButton.set_Font (UIKit.UIFont value) [0x0003b] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/build/ios/native/UIKit/UIButton.g.cs:763 
  at ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x00091] in <7759d8ac37db42529d25b92f728ae115>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000cc] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000cc] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
  at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2983 
  at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__44.MoveNext () [0x00016] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.NavigationPage+<PushAsyncInner>d__79.MoveNext () [0x00095] in C:\agent\_work\3\s\Xamarin.Forms.Core\NavigationPage.cs:360 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Xamarin.Forms.NavigationPage+<PushAsync>d__52.MoveNext () [0x0017f] in C:\agent\_work\3\s\Xamarin.Forms.Core\NavigationPage.cs:200 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at AudioGuide.MainPage+<OnItemSelected>d__2.MoveNext () [0x0005d] in /Users/Vlad/Projects/AudioGuide/AudioGuide/Views/MainPage.xaml.cs:25 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.2.0.11/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5481/2f8bbec0/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at AudioGuide.iOS.Application.Main (System.String[] args) [0x00001] in /Users/Vlad/Projects/AudioGuide/iOS/Main.cs:17 

I have added the following to Info.plist:

	<key>UIAppFonts</key>
	<array>
		<string>MaterialIcons-Regular.ttf</string>
	</array>

And I have also initialised the button plugin:

    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.Init();
            LoadApplication(new App());
            return base.FinishedLaunching(app, options);
        }
    }

If I use an image for the button instead of the font-based icon everything works.

Thanks

My button is not round

I followed the instructions with init and adding a CircleButton, but my button within Android is not round. What do I wrong?

I'm using Xamarin Forms 2.3.5.233-pre1, Android 6.0 API 23, ButtonCircle 1.2.47.

How to use a png instead of icon?

Hi, I'm using is there a way to use a .png image instead of icon? When I put in
<controls:CircleButton Icon="test.png" FontSize="30" Grid.Row="1" Grid.Column="0" TextColor="White" HeightRequest="70" BorderRadius="70" WidthRequest="70" BorderColor="Black" BackgroundColor="#99E758" Clicked="CircleButton_Clicked"/>
it throws error, test.png is a .png file under drawable (I'm using Android).

Issue in IOS iPhone

at UIKit.UIButton.set_Font (UIKit.UIFont value) [0x0003b] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/build/ios/native/UIKit/UIButton.g.cs:735
at ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x00091] in <7759d8ac37db42529d25b92f728ae115>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00118] in <198357063d5b4644a3f843dfe938cc9c>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <198357063d5b4644a3f843dfe938cc9c>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000cc] in <198357063d5b4644a3f843dfe938cc9c>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <198357063d5b4644a3f843dfe938cc9c>:0 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:63 at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:36 at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:105 at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr) at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2724 at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:40 at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:55 at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Platform.cs:192 at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:340 at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__44.MoveNext () [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:327 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at Xamarin.Forms.Platform.iOS.NavigationRenderer+<b__39_0>d.MoveNext () [0x00022] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:214
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.20/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/Foundation/NSAction.cs:163
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at NavigationMasterDetail.iOS.Application.Main (System.String[] args) [0x00001] in /Users/rnr_mac/Shreyans/Projects/eMaktab/Master-Detail_Navigation_Xamarin.Forms-master/NavigationMasterDetail/NavigationMasterDetail.iOS/Main.cs:14

Exception on Dispose

I have a button defined in XAML as:

<buttoncircle:CircleButton Grid.Row="8" Grid.Column="1" x:Name="infoButton" Icon="ic_info" TextColor="White" FontSize="24" HeightRequest="24" WidthRequest="24" BorderThickness="1" BackgroundColor="#0076fa" VerticalOptions="Center" HorizontalOptions="Center" Command="{Binding InfoCommand}" />

It displays perfectly and is used to display some information text on a new page. But if I cancel from the page even without tapping the button I get a null reference exception that appears to be an issue triggered by trying to Dispose the button.

at ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e) [0x00022] in <a4abc774e1e04cf88321114ac113a4d8>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00118] in :0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Dispose (System.Boolean disposing) [0x0008c] in <eb211aa32ac8429489411f4d642db9c2>:0 at Xamarin.Forms.Platform.iOS.ViewRenderer2[TView,TNativeView].Dispose (System.Boolean disposing) [0x00000] in :0
at Xamarin.Forms.Platform.iOS.ButtonRenderer.Dispose (System.Boolean disposing) [0x00036] in :0
at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/data/lanes/5520/51128b8c/source/xamarin-macios/src/Foundation/NSObject2.cs:133
at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in :0
at Xamarin.Forms.Platform.iOS.Platform+d__23.MoveNext () [0x0015f] in :0
--- End of stack trace from previous location where exception was thrown ---

Is there something I'm missing here?

Crashes on Android When Navigate to Page

This plugin has issues where when you navigate to a page with the ButtonCircle, the app crashes with the following error. Was working before update to v2.0.2 and latest Xamarin Forms 2.5....

ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e)
System.NullReferenceException: Object reference not set to an instance of an object

1
ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs1[TElement] e) 2 VisualElementRenderer1[TElement].SetElement (TElement element)
3
IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element)
4
Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context)
5
VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren)
6
VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement)
7
VisualElementPackager.Load ()
8
VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) 9 VisualElementRenderer1[TElement].SetElement (TElement element)
10
IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element)
11
Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context)
12
VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren)
13
VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement)
14
VisualElementPackager.Load ()
15
VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) 16 VisualElementRenderer1[TElement].SetElement (TElement element)
17
IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element)
18
Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context)
19
ViewCellRenderer.GetCellCore (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context)
20
CellRenderer.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context)
21
CellFactory.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context, Xamarin.Forms.View view)
22
ListViewAdapter.GetView (System.Int32 position, Android.Views.View convertView, Android.Views.ViewGroup parent)
23
BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position, System.IntPtr native_convertView, System.IntPtr native_parent)
24
(wrapper dynamic-method) System.Object.0da3b9c2-4f96-42ce-bd4d-03be1c52fc87(intptr,intptr,int,intptr,intptr)

Loses overlay on Android

ButtonCircle looks good on iOS but on Android it can lose the overlay and just look like an icon. When I first load my app it tries to login the user. When it does that it pops up a modal dialog with "Signing in...". I can see the circle underneath the signing in message but when the user is signed in and the modal is dismissed, the circle is gone. It still functions correctly but looks odd.

Border Thickness do not work on Android 6.0 API 23

Hi!

I have a problem with your package right now on Android 6.0 API 23 and Plugins.Forms.ButtonCircle v2.0.1.48-beta from nuget. I have the following code:

<circleBtn:CircleButton Text="Hello"
                                        FontAttributes="Bold"
                                        WidthRequest="150"
                                        HeightRequest="150"
                                        HorizontalOptions="CenterAndExpand"
                                        VerticalOptions="CenterAndExpand"
                                        BorderRadius="150"
                                        FontSize="22"
                                        TextColor="White"
                                        BackgroundColor="Black"
                                        TranslationY="30"
                                        BorderThickness="20"
                                        BorderColor="Gray"
                                        />

BorderThickness works fine on Android 7.1, but not on 6.0. It is not even displayed.
Is this an known issue?

Thank you!

System.ArgumentNullException

Hola Wilson

Estuve probando tu control pero recibo siempre este error cuando abro la página donde está el control button circle. Ya tuviste algo parecido ? Muchas gracias por tu información.

Saludos cordiales
Kewin


at UIKit.UIButton.set_Font (UIKit.UIFont value) [0x00011] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/build/ios/native/UIKit/UIButton.g.cs:725 
  at ButtonCircle.FormsPlugin.iOS.ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x00091] in <019ef9ea9d5345738e9a61978d0e1f83>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000cc] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
  at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2718 
  at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPushAsync>d__44.MoveNext () [0x00016] in <8f7e3b9d1483403590c8ab3d78cce1ac>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.NavigationPage+<PushAsyncInner>d__79.MoveNext () [0x00095] in C:\agent\_work\3\s\Xamarin.Forms.Core\NavigationPage.cs:360 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Xamarin.Forms.NavigationPage+<PushAsync>d__52.MoveNext () [0x0017f] in C:\agent\_work\3\s\Xamarin.Forms.Core\NavigationPage.cs:200 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at DireoMobile.XamarinForms.Views.StudentsPage+<OnStudentSelected>d__3.MoveNext () [0x0005d] in /Users/kewinremy/Projects/drivin/Direo/DireoMobile/DireoMobile.XamarinForms/Views/Students/StudentsPage.xaml.cs:36 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIKitSynchronizationContext.cs:24 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/Foundation/NSAction.cs:163 
--- End of stack trace from previous location where exception was thrown ---
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at DireoMobile.iOS.Application.Main (System.String[] args) [0x00001] in /Users/kewinremy/Projects/drivin/Direo/DireoMobile/DireoMobile.iOS/Main.cs:12 

Multi Line Labels in Buttons

I noticed a difference when deploying to iphone and android..

When I need two lines of text within the button normally in XAML we can use this

  <local:CircleButton x:Name="Order" FontSize="Large" TextColor="Black" 
                        Text="Orders&#x0a;&#x0a;10"
                        HeightRequest="100" BorderRadius="100" WidthRequest="100" Margin="-50,-50,-50,-50"
                        BorderColor="Black" BorderThickness="5" BackgroundColor="Orange"
                        Clicked="onCircleButton_Clicked" Grid.Row="2" Grid.Column="1" />

This works great on Android and I get the text "Orders" with the number Below it...

On the iphone I just get the text "Orders" and it appears the additional lines of text where not present.

Some problems on real devices.

Hello, I' ve trying to use Your solution, but it doesn't work on some real device : phone Honor (Android 6.0) and tablet Dexp (Android 5). On other devices it works fine.
It's normal?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.