UraniumUI
UraniumUI copied to clipboard
Bug: Can't use BlurEffect with Scrollview
Adding a blue effect to a scrollview causes an exception
<ScrollView>
<ScrollView.Effects>
<uranium:BlurEffect Mode="Dark" />
</ScrollView.Effects>
<!-- <content> -->
</ScrollView>
I get the following error when running
Not sure it is related, but I can't seem to get the blue effect to work in the following scenario:
<Grid>
<Grid.Effects>
<uranium:BlurEffect Mode="Dark" />
</Grid.Effects>
<ScrollView>
<!-- <content> -->
</ScrollView>
</Grid>
Doing so shows nothing that is blurred
I tried to port https://github.com/mmin18/RealtimeBlurView library for android but in android there is a lot of limitation and one of them is actually this one.
I have and an example with blur view and scrollview at the same time below: https://github.com/enisn/UraniumUI/blob/develop/demo/UraniumApp/Pages/Blurs/BlursDemoPage.xaml I'm not sure if it fist to your requirements but this way (rendering blur over listview) works normally but renderin blur behimd or inside listbiew is problematic.
Android usage of blur unfortunately so limited :(
If there is a better way for rendering blurs on android we can implement it soon, but for now the situation is this unfortunately
By the way, settting WidthRequest is required for android since it can't calculate the size of parent of parent automatically
I was able to get it to work by placing a grid around the scrollview that had the effect + adding the width to the grid
I did notice that the AccentOpacity is not bindable. Was that a design decision?
I was able to get it to work by placing a grid around the scrollview that had the effect + adding the width to the grid
I did notice that the AccentOpacity is not bindable. Was that a design decision?
PlatformEffects are not BindableObject and designed by dotnet/maui
, So there is no way to define BindableProperties to Effects. They still reflect runtime changes but {Binding }
extension can't be used at the moment
There is nothing to do on my side for android implementation of blur. If there is a better implementation on native android we can move to it.
https://github.com/mmin18/RealtimeBlurView repository seems stale for now but it was the best option for the first implementation of blurs.