-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Not render shadows on without a ShadowColor #6191
Conversation
@@ -8,7 +8,7 @@ public class Shadow : Element, IShadow | |||
|
|||
public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(Shadow), 1f); | |||
|
|||
public static readonly BindableProperty BrushProperty = BindableProperty.Create(nameof(Brush), typeof(Brush), typeof(Shadow), null); | |||
public static readonly BindableProperty BrushProperty = BindableProperty.Create(nameof(Brush), typeof(Brush), typeof(Shadow), Brush.Black); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default Shadow Brush becomes a black SolidColorBrush.
@@ -164,7 +164,7 @@ void DisposeShadow() | |||
|
|||
async Task CreateShadowAsync() | |||
{ | |||
if (Child == null || Shadow == null) | |||
if (Child == null || Shadow == null || Shadow.Paint == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid render shadows on Windows if the ShadowColor property is null.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
float opacity = 0; | ||
var shadowColor = Graphics.Colors.Transparent; | ||
var offset = new Graphics.Point(1, 1); | ||
float blurRadius = 10f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default Values.
Description of Change
This PR is related with the issue 5820, but actually, that issue had two different issues. On the one hand, the Shadow applied to the Border was not rendered on Android and on the other hand, the shape is not quite correct.
What happens:
This PR adds the following changes:
<Shadow />
with the default properties renders a black shadow around the View on all platforms.Fixes ##5820