Comments (8)
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.
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.
Also, did you read : https://github.com/roubachof/Sharpnado.Shadows/blob/master/README.md#animating-shadows ?
from sharpnado.shadows.
@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.
yup always start by removing shadows and see if the issue is still there x)
from sharpnado.shadows.
@roubachof for me there is no problem with shadows ;)
from sharpnado.shadows.
@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="" TextColor="{StaticResource primary}" FontSize="40" FontFamily="{StaticResource FontAwesomeSolid}" HorizontalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/> <Label Text="Note" HorizontalOptions="Center" HorizontalTextAlignment="Center"/> </StackLayout> </sh:Shadows> ...
EDIT: and yes, when I remove the shadows everything works fine
from sharpnado.shadows.
sorry but:
- your xaml is not even formatted: it's unreadable
- 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)
- [Bug][UWP] White Background added inside Shadow element when using SingleShade. HOT 3
- Shade ColorBindableProperty is not Dynamic ! HOT 6
- Colored Neumorphism HOT 2
- Can you please release a version for mac? HOT 1
- [Question] Adding shadow in Code Behind HOT 4
- Shadow works only with iOS HOT 6
- Shadow White Box HOT 2
- Java.Lang.OutOfMemoryError on Android HOT 7
- [Enhancement] Inner Shadows
- Crash: ShadowView.CreateBitmap: java.lang.nullpointerException HOT 3
- How-To: offset (0,-15) but bottom padding causes shadow on the lower side HOT 1
- [Bug] Super weird behavior with Material button
- Shadow binding stopped working in 1.2.0 version (worked in 1.1.0) HOT 21
- Possible to dynamically change properties on a shade using DataTriggers?
- Support MAUI HOT 7
- Strict mode - ShadowView LeakedClosableViolation
- [BUG] udating to XamarinFrom 5.0.0.2291 InvalidOperationException "Invalid on Color.Default"
- iOS shadows do not have the correct color after updating Sharpnado.Shadows Nuget
- Maui support? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpnado.shadows.