How to create a simple Floating Button with Xamarin.Forms/MAUI

For a while, I have been trying to search how to create a simple Floating Button and this is my final code:

<AbsoluteLayout>
<!–Other components–>
<ImageButton Source=”plus.png”
BackgroundColor=”Green”


This content originally appeared on DEV Community and was authored by Federico Navarrete

For a while, I have been trying to search how to create a simple Floating Button and this is my final code:

<AbsoluteLayout>
     <!--Other components-->
     <ImageButton Source="plus.png" 
            BackgroundColor="Green"
        CornerRadius="80"
            AbsoluteLayout.LayoutFlags="PositionProportional"  
            AbsoluteLayout.LayoutBounds=".95,.95,80,80" />
</AbsoluteLayout>
  • The Source is the picture you want to use.
  • The BackgroundColor is the color you want to use in HEX.
  • The CornerRadius is to create the form.
  • The AbsoluteLayout.LayoutBounds is the location.

This will be the result:

example

You can get the icon from:

https://materialdesignicons.com

And I got some inspiration from here:

https://stackoverflow.com/a/54519048/1928691


This content originally appeared on DEV Community and was authored by Federico Navarrete


Print Share Comment Cite Upload Translate Updates
APA

Federico Navarrete | Sciencx (2021-06-17T08:57:46+00:00) How to create a simple Floating Button with Xamarin.Forms/MAUI. Retrieved from https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/

MLA
" » How to create a simple Floating Button with Xamarin.Forms/MAUI." Federico Navarrete | Sciencx - Thursday June 17, 2021, https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/
HARVARD
Federico Navarrete | Sciencx Thursday June 17, 2021 » How to create a simple Floating Button with Xamarin.Forms/MAUI., viewed ,<https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/>
VANCOUVER
Federico Navarrete | Sciencx - » How to create a simple Floating Button with Xamarin.Forms/MAUI. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/
CHICAGO
" » How to create a simple Floating Button with Xamarin.Forms/MAUI." Federico Navarrete | Sciencx - Accessed . https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/
IEEE
" » How to create a simple Floating Button with Xamarin.Forms/MAUI." Federico Navarrete | Sciencx [Online]. Available: https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/. [Accessed: ]
rf:citation
» How to create a simple Floating Button with Xamarin.Forms/MAUI | Federico Navarrete | Sciencx | https://www.scien.cx/2021/06/17/how-to-create-a-simple-floating-button-with-xamarin-forms-maui/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.