Giter Club home page Giter Club logo

xamarin.forms.neocontrols's Introduction

Xamarin.Forms.NeoControls

Controls for Xamarin Forms based on neumorphism tendency

NuGet

FOR MAUI MIGRATION

https://github.com/felipebaltazar/Maui.NeoControls

Examples

https://github.com/felipebaltazar/NeomorphismSmartHomeApp

example

Getting started

  • Install the Xamarin.Forms.NeoControls package
Install-Package Xamarin.Forms.NeoControls -Version 1.1.0-pre

No Xaml namespace declaration is needed

  • Use the controls
    <NeoButton Elevation=".25"
               CornerRadius="70,20,20,20"
               BackgroundColor="#e3edf7"/>
  • You can also insert any view inside the neo controls
        <NeoButton BackgroundColor="#e3edf7">
            
            <StackLayout Orientation="Vertical">
                <Image Source="MyImage.png "/>
                <Label Text="My Button Label"/>
            </StackLayout>
            
        </NeoButton>
  • Background with gradient
    <NeoButton>
        <NeoButton.BackgroundGradient>
            <LinearGradient Angle="45">
                <GradientStop Color="Red" Offset="0" />
                <GradientStop Color="Yellow" Offset="1" />
            </LinearGradient>
        </NeoButton.BackgroundGradient>

        <StackLayout Orientation="Vertical">
            <Image Source="MyImage.png "/>
            <Label Text="My Button Label"/>
        </StackLayout>
    </NeoButton>

Property reference

Property What it does Extra info
CornerRadius A CornerRadius object representing each individual corner's radius. Uses the CornerRadius struct allowing you to specify individual corners.
Elevation Set this value to chenge element depth effect.
InnerView View that will be shown inside the neo control.
ShadowBlur Set this value to change shadow blur effect.
ShadowDistance Set this value to change shadow distance relative from control.
DarkShadowColor The Dark color that will be applied on draw the dark shadow. This will be applied with Elevation property, as Alpha parameter.
LightShadowColor The White color that will be applied on draw the light shadow.
BackgroundGradient Draw a gradient on background's control When value != null, backgroundColor Property will be ignored

Contributors

xamarin.forms.neocontrols's People

Contributors

felipebaltazar 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin.forms.neocontrols's Issues

Circular buttons

I have tried to create a circular button by having the corner radius equal to the height / 2. However this doesn't seem to work.

<neo:Button .....
    HeightRequest="80"
    WidthRequest="80"
    CornerRadius="40"
 />

Do you have any idea why this is.

[Spec] Override default BackgroundColor behavior

Overview

We need to provide a way to use neocontrol`s background color with gradients and keep contentview (root layout) transparent.

Actual behavior:

image

Expected behavior:

image

Suggestion:

Hide the inherited background-color

[Browsable(false)]
[Bindable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This BackgroundColor does not work on neocontrol", true)]
public new Color BackgroundColor { get; set; }
public static readonly new BindableProperty BackgroundColorProperty =
        BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(NeoView), Color.Transparent)

Provide one new BackgroundColor that can be used with multiple colors, like MagicGradients

Usage

<neo:NeoButton Background ="Color.Red" />

<neo:NeoButton >
    <neo:NeoButton.Background >
      <neo:LinearGradient Angle="45">
            <neo:GradientStop Color="Red" Offset="0" />
            <neo:GradientStop Color="Yellow" Offset="1" />
        </neo:LinearGradient>
    <neo:NeoButton.Background >
</neo:NeoButton >

MAUI port

Hey there!

Great job with this package, I wanted to know, are you planning on creating a .NET MAUI port of this package. it would be neat, wouldn't it? ๐Ÿ˜

If you need some help to do it I might be able to give you some ๐Ÿ˜‰

ChangeCanExecute via the Xamarin Form Command Interface

Hi there,

Firstly thanks so much for the library! Its really great!

However, converting from Syncfusion buttons to this, I am having issues with ChangeCanExecute... triggering this no longer calls the Func<object, bool> canExecute for the specific Command. I am using this to enable/disable the button as well as change the background colors.

[NeoButton]Animate twice when `toggle mode` button tapped.

Thanks for your great work, your NeoControls are beautiful! I love this one.

Look into NeoButton control, When I set ClickMode property as Toggle and tapped it, I found the tapped animation looks like occurred twice.

20200426_220804

So I would like to propose like below.

         private static async Task PerformIsCheckedAnimationAsync(NeoButton neoButton)
         {
             await neoButton.AnimateClick(neoButton.ShadowDistance * -1);
             //await neoButton.AnimateClick(neoButton.ShadowDistance);
         }

Result :

20200426_223833

Please consider about this if you like.

Thank you.

NeoControls playground

Overview

Provides a XamarinForms application with all NeoControl`s that we can change the properties at runtime

Like this (magic gradients):

image

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.