Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FloatingActionButton (FAB) with custom shadow (Color, Offset, Blur) and custom Animation Easing (Show, Hide) for Xamarin.Forms view (Android, iOS, UWP)

License

NotificationsYou must be signed in to change notification settings

ThunderDesign/ThunderDesign.Xamarin.Forms.FloatingActionButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CICDNugetLicenseNet

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

FAB

Getting Started:

Sample

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"/>

Sample Style (same as Button)

<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>

Installation

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.

Platforms

  • 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.

    • modifyAppDelegate.cs and 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.

    • modifyApp.xaml.cs and 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);    ...}

Examples

(TIP: Clone repo, open the solution, build it and run sample app.)

Please Contribute!

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

Stars

Watchers

Forks

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp