-
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] Fix for setting IsClippedToBounds="True" inside a Border control will crash on Windows #25506
Merged
Merged
[Windows] Fix for setting IsClippedToBounds="True" inside a Border control will crash on Windows #25506
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
388c3c8
Fixed 18937
Tamilarasan-Paranthaman c5b6682
Modified test sample.
Tamilarasan-Paranthaman a81a447
Updated the fix.
Tamilarasan-Paranthaman 65b7ea7
Simplified the test case.
Tamilarasan-Paranthaman 13ce9bc
Removed platform condition.
Tamilarasan-Paranthaman 943c085
Changed return type.
Tamilarasan-Paranthaman 82eaee9
ContentPanel changes.
Tamilarasan-Paranthaman 07b2ef6
Revert unwanted changes
Tamilarasan-Paranthaman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/Controls/tests/TestCases.HostApp/Issues/Issue18937.xaml
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue18937"> | ||
|
||
<Border> | ||
<StackLayout BackgroundColor="red" | ||
IsClippedToBounds="True"> | ||
<Label AutomationId="Label" | ||
Text="Label Inside the Border" | ||
VerticalOptions="Center" | ||
HorizontalOptions="Center"/> | ||
</StackLayout> | ||
</Border> | ||
|
||
</ContentPage> |
12 changes: 12 additions & 0 deletions
12
src/Controls/tests/TestCases.HostApp/Issues/Issue18937.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
|
||
[Issue(IssueTracker.Github, 18937, "[Windows] Setting IsClippedToBound is true inside a Border control will crash on Windows", PlatformAffected.UWP)] | ||
public partial class Issue18937 : ContentPage | ||
{ | ||
public Issue18937() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18937.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue18937 : _IssuesUITest | ||
{ | ||
public Issue18937(TestDevice device) : base(device) { } | ||
|
||
public override string Issue => "[Windows] Setting IsClippedToBound is true inside a Border control will crash on Windows"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Border)] | ||
public void ExceptionShouldNotOccurWhenIsClippedToBoundsIsTrue() | ||
{ | ||
var testLabel = App.WaitForElement("Label"); | ||
Assert.That(testLabel.GetText(), Is.EqualTo("Label Inside the Border")); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could avoid async void? Because error propagation and also the call stack may not accurately represent the execution flow at the time the exception was thrown, complicating the process of identifying and fixing bugs.
Return a Task and rename the method to
UpdateClipAsync
.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.
@jsuarezruiz, I have renamed the method to
UpdateClipAsync
and changed its return type to Task. Could you please check once and let me know if you have any concerns?