roubachof / Sharpnado.MaterialFrame

A modern MAUI (and XF) Frame component supporting blur, acrylic, dark mode. Implemented with RealtimeBlurView on Android (custom blurview) and UIVisualEffectView on iOS.
MIT License
505 stars 29 forks source link

White Shadow on Android BlurRadius #15

Closed andre-laskawy closed 3 years ago

andre-laskawy commented 3 years ago

Using the Android Blur Radius, e.g. like this

        <materialFrame:MaterialFrame
            Padding="0"
            AndroidBlurRadius="20"
            MaterialBlurStyle="{DynamicResource DynamicBlurStyle}"
            MaterialTheme="AcrylicBlur" />

and then putting any white control on it (e.g. a White Button) results in a light white shadow around the control, I couldn't find any solution to get rid of the shadow:

image

roubachof commented 3 years ago

Set the AndroidMaterialFrameRenderer.ThrowStopExceptionOnDraw to true

andre-laskawy commented 3 years ago

Nice, that worked! Can't debug with this flag on, but I can get around this with a compiler constant.

roubachof commented 3 years ago

https://github.com/roubachof/Sharpnado.MaterialFrame#androidmaterialframerendererthrowstopexceptionondraw

yup this is a xamarin.android issue, is should be fixed in 16.8 though according to https://github.com/xamarin/xamarin-android/issues/4548

andre-laskawy commented 3 years ago

ohh ... I really should start reading the documentation. Cheers :)