Skip to content

Commit

Permalink
Fix brushes in Frame (#7925)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz authored Nov 23, 2022
1 parent e6c779d commit 193924b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Compatibility/Core/src/iOS/Renderers/FrameRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ public virtual void SetupLayer()
public override void LayoutSubviews()
{
if (_previousSize != Bounds.Size)
{
SetNeedsDisplay();
this.UpdateBackgroundLayer();
}

base.LayoutSubviews();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
<Label
Text="Only with BackgroundColor" />
</Frame>
<Label
Text="Background"
Style="{StaticResource Headline}"/>
<Frame>
<Frame.Background>
<LinearGradientBrush EndPoint="1,0">
<GradientStop Color="Yellow"
Offset="0.1" />
<GradientStop Color="Green"
Offset="1.0" />
</LinearGradientBrush>
</Frame.Background>
<Label
Text="Background" />
</Frame>
<Label
Text="BorderColor"
Style="{StaticResource Headline}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ void UpdateShadow()
public override void LayoutSubviews()
{
if (_previousSize != Bounds.Size)
{
SetNeedsDisplay();
this.UpdateBackgroundLayer();
}

base.LayoutSubviews();
}
Expand Down

0 comments on commit 193924b

Please sign in to comment.