Coder Social home page Coder Social logo

Comments (8)

roubachof avatar roubachof commented on September 15, 2024

Well you should be doing something wrong. Maybe have a look to the sample which scroll smoothly with more than 20 different shadows displayed. Of course can't do anything without a repro. Also did you use the latest version ?

from sharpnado.shadows.

Huaba93 avatar Huaba93 commented on September 15, 2024

Same problem here. I am using just one shadow and the entire page takes 1-2 MINUTES to render.

I will provide more infos soon

from sharpnado.shadows.

roubachof avatar roubachof commented on September 15, 2024

Also, did you read : https://github.com/roubachof/Sharpnado.Shadows/blob/master/README.md#animating-shadows ?

from sharpnado.shadows.

Huaba93 avatar Huaba93 commented on September 15, 2024

@roubachof I think I was a little too hasty. atm I don't think shadows are causing my problems. It's more a forms 5 + AndroidX issue. i am still investigating

from sharpnado.shadows.

roubachof avatar roubachof commented on September 15, 2024

yup always start by removing shadows and see if the issue is still there x)

from sharpnado.shadows.

Huaba93 avatar Huaba93 commented on September 15, 2024

@roubachof for me there is no problem with shadows ;)

from sharpnado.shadows.

Tarekka avatar Tarekka commented on September 15, 2024

@roubachof , thanks for your response.
I actually tried it in another one of my apps and it works perfectly.
But in this app it takes time for some reason.

Any suggestions?
I'm using the latest version by the way, and I'm not animating anything.
Here's my example code:

App.xaml:
<Style ApplyToDerivedTypes="True" TargetType="sh:Shadows"> <Setter Property="CornerRadius" Value="10" /> <Setter Property="Shades"> <sh:ImmutableShades> <sh:Shade BlurRadius="50" Opacity="1" Offset="-10,-10" Color="#80FFFFFF" /> <sh:Shade BlurRadius="50" Opacity="1" Offset="6, 6" Color="#33000000" /> </sh:ImmutableShades> </Setter> </Style>

One of the cells from my test page:
... <sh:Shadows Grid.Column="0" Grid.Row="0" CornerRadius="20" StyleId="Note"> <sh:Shadows.GestureRecognizers><TapGestureRecognizer NumberOfTapsRequired="1" Tapped="TapGestureRecognizer_Tapped"/></sh:Shadows.GestureRecognizers> <StackLayout BackgroundColor="#F0F0F3" Grid.Column="0" Padding="10" > <Label Text="&#xf249;" TextColor="{StaticResource primary}" FontSize="40" FontFamily="{StaticResource FontAwesomeSolid}" HorizontalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/> <Label Text="Note" HorizontalOptions="Center" HorizontalTextAlignment="Center"/> </StackLayout> </sh:Shadows> ...

Output:
ezgif com-video-to-gif

EDIT: and yes, when I remove the shadows everything works fine

from sharpnado.shadows.

roubachof avatar roubachof commented on September 15, 2024

sorry but:

  1. your xaml is not even formatted: it's unreadable
  2. shadows are costly to render so I guess when you are clicking the button, the view build time is causing this lag

You can either prerender your view then translate by the y axis when clicking the button.
Or use the LazyView on the "common" page, and call Load on the LazyView when the page is loaded:

https://www.sharpnado.com/xamarin-forms-lazyview-boost-your-app-reactivity-and-startup-time/

In all case, it's not a performance issue with shadows but a question of architecture and layout timing.

from sharpnado.shadows.

Related Issues (20)

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.