-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dde0d73
commit eccf37e
Showing
9 changed files
with
566 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/Controls/tests/TestCases.HostApp/Issues/Issue24414.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,54 @@ | ||
using Microsoft.Maui.Controls.Shapes; | ||
|
||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[Issue(IssueTracker.Github, 24414, "Shadows not rendering as expected on Android and iOS", PlatformAffected.Android | PlatformAffected.iOS)] | ||
|
||
public partial class Issue24414 : ContentPage | ||
{ | ||
int fn = 0; | ||
public Issue24414() | ||
{ | ||
InitializeComponent(); | ||
UpdateLabel(); | ||
} | ||
|
||
private void OnTapGestureRecognizerTapped(object sender, EventArgs e) | ||
{ | ||
var grid = (Grid)Content; | ||
foreach (IView view in grid) | ||
{ | ||
if (view is Border { Shadow: not null } border) | ||
{ | ||
switch (fn) | ||
{ | ||
case 0: | ||
border.WidthRequest += 4; | ||
border.HeightRequest += 4; | ||
break; | ||
case 1: | ||
border.StrokeShape = new RoundRectangle { CornerRadius = border.WidthRequest }; | ||
break; | ||
case 2: | ||
border.Shadow.Radius -= 8; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
UpdateLabel(); | ||
|
||
++fn; | ||
} | ||
|
||
void UpdateLabel() | ||
{ | ||
TheLabel.Text = fn switch | ||
{ | ||
0 => "Tap to resize the border", | ||
1 => "Tap to change the border shape", | ||
2 => "Tap to change the shadow radius", | ||
_ => "Done" | ||
}; | ||
} | ||
} |
Oops, something went wrong.