Comments (7)
Yup, don't put shadows around a layout that is 12000 pixels height, you will end up with a Bitmap of 12000 pixels, and you know what will happen x)
from sharpnado.shadows.
as a workaround, if you are only interested by a bottom shadow for example, put a smaller transparent ContentView (maybe 50dp height) at the bottom of your layout, underneath your very looooong view, and add the shadow to this ContentView.
from sharpnado.shadows.
I didn't put shadows around a layout that is 12000 pixels. The container with shadows has circa 150px. Main problem is in situation when Expander is expanded, because there are 2000px.
It looks like this:
<StackLayout>
<ScrollView>
<StackLayout BindableLayout.ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" Margin="0">
<BindableLayout.ItemTemplate>
<DataTemplate>
<StackLayout>
<Label Text="{Binding IsLast}" x:Name="IsLast" IsVisible="False" />
<AbsoluteLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<shades:Shadows AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" CornerRadius="1">
<Frame HasShadow="False" CornerRadius="8">
<controls:CommandExpander Expanded="{Binding Path=IsExpanded, Mode=TwoWay}">
<views:Expander.Header>
<StackLayout Orientation="Horizontal">
<!--MY CONTENT-->
</StackLayout>
</views:Expander.Header>
</controls:CommandExpander>
</Frame>
</shades:Shadows>
<BoxView AbsoluteLayout.LayoutBounds="0,0,2,10">
</BoxView>
</AbsoluteLayout>
</StackLayout>
</DataTemplate>
</BindableLayout.ItemTemplate>
</StackLayout>
</ScrollView>
</StackLayout>
from sharpnado.shadows.
well 2000px bitmap is hitting OutOfMemory on your device, so it's the same issue.
same workaround apply.
Wrap a ContentView with Shadows, put it before your CommandExpander and at the end of your AbsoluteLayout, make is smaller, like
AbsoluteLayout.LayoutBounds="0,1,1,50" AbsoluteLayout.LayoutFlags="Positional,WidthProportional"
from sharpnado.shadows.
I don't understand how it make smaller. Look, my current view looks like this, when all expanders aren't expanded.
It's (shaddow effect) possible because my frame is in shadow view. Do you suggest add shaddows on the top and the bottom of
CommandExpander? This solution will remove frame effect with corners.
Could you explain your idea?
from sharpnado.shadows.
Then just put a Shadows around each expander's header instead of the whole command expander.
Since Shadows caches the bitmaps, it will only use one small bitmap instead of a giant one, and you will have a nicer effect.
from sharpnado.shadows.
It's solution. I put Shadows only around expander header instead of all expander.
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
- Very bad performance on Android HOT 8
- 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
- [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.