- Notifications
You must be signed in to change notification settings - Fork1
FloatingActionButton (FAB) with custom shadow (Color, Offset, Blur) and custom Animation Easing (Show, Hide) for Xamarin.Forms view (Android, iOS, UWP)
License
ThunderDesign/ThunderDesign.Xamarin.Forms.FloatingActionButton
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
FloatingActionButton (FAB) with custom shadow (Color, Offset, Blur) and custom Animation Easing (Show, Hide) for Xamarin.Forms view (Android, iOS, UWP)
| Supported platforms |
|---|
| ✔️ Android |
| ✔️ iOS |
| ✔️ UWP |
After installation, start using the features you're after.
If you're using XAML, you can add this namespace to your root node to get access to the FAB:xmlns:fab="clr-namespace:ThunderDesign.Xamarin.Forms.FloatingActionButton.Controls;assembly=ThunderDesign.Xamarin.Forms.FloatingActionButton".
<fab:FloatingActionButtonText="+"Style="{StaticResource RoundFAB}"Command="{Binding NewItemCommandAsync}"VerticalOptions="End"HorizontalOptions="End"Margin="25"/>
<Stylex:Key="RoundFAB"TargetType="fab:FloatingActionButton"> <SetterProperty="TextColor"Value="White"></Setter> <SetterProperty="FontSize"Value="30"></Setter> <SetterProperty="WidthRequest"Value="56"></Setter> <SetterProperty="HeightRequest"Value="56"></Setter> <SetterProperty="CornerRadius"Value="28"></Setter></Style><StyleTargetType="fab:FloatingActionButton"> <SetterProperty="VisualStateManager.VisualStateGroups"> <VisualStateGroupList> <VisualStateGroupx:Name="CommonStates"> <VisualStatex:Name="Normal"> <VisualState.Setters> <SetterProperty="BackgroundColor"Value="{StaticResource Primary}" /> </VisualState.Setters> </VisualState> <VisualStatex:Name="Disabled"> <VisualState.Setters> <SetterProperty="BackgroundColor"Value="#332196F3" /> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateGroupList> </Setter></Style>
Grab the latestThunderDesign.Xamarin.Forms.FloatingActionButton NuGet package and install in your solution.
Install-Package ThunderDesign.Xamarin.Forms.FloatingActionButton
Use the-version option to specify anolder version to install.
- Android
- You will need to add the NuGet package to your.NET Standard library project
- iOS
Important: You will need to add the NuGet package toboth your.NET Standard library project and yourplatform-dependent iOS project.
modify
AppDelegate.csand addSharpnado.Shades.iOS.iOSShadowsRenderer.Initialize();publicoverrideboolFinishedLaunching(UIApplicationapp,NSDictionaryoptions){ ...global::Xamarin.Forms.Forms.Init();Sharpnado.Shades.iOS.iOSShadowsRenderer.Initialize();LoadApplication(newApp()); ...}
- UWM
Important: You will need to add the NuGet package toboth your.NET Standard library project and yourplatform-dependent UWM project.
modify
App.xaml.csand addvar rendererAssemblies = new[] { typeof(UWPShadowsRenderer).GetTypeInfo().Assembly };protectedoverridevoidOnLaunched(LaunchActivatedEventArgse){ ...global::Xamarin.Forms.Forms.SetFlags("Shell_UWP_Experimental");varrendererAssemblies=new[]{typeof(UWPShadowsRenderer).GetTypeInfo().Assembly};Xamarin.Forms.Forms.Init(e); ...}
(TIP: Clone repo, open the solution, build it and run sample app.)
- Xamarin
This is an open source project that welcomes contributions/suggestions/bug reports from those who use it. If you have any ideas on how to improve the library, pleasepost an issue here on GitHub. Please check out theHow to Contribute.
About
FloatingActionButton (FAB) with custom shadow (Color, Offset, Blur) and custom Animation Easing (Show, Hide) for Xamarin.Forms view (Android, iOS, UWP)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
