-
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.
Child Span font attributes inheritance
- Loading branch information
Showing
9 changed files
with
137 additions
and
8 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
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
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
Binary file added
BIN
+27 KB
...TestCases.Android.Tests/snapshots/android/SpanShouldInheritLabelsProperties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
src/Controls/tests/TestCases.HostApp/Issues/Issue21034.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,35 @@ | ||
<?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.Issue21034"> | ||
<Label TextColor="Blue" | ||
AutomationId="Label" | ||
Margin="30" | ||
VerticalOptions="Center" | ||
TextDecorations="Underline" | ||
FontAttributes="Bold"> | ||
<Label.FormattedText> | ||
<FormattedString> | ||
<Span Text="Bold, underlined, blue"/> | ||
<Span Text=" " | ||
TextDecorations="None"/> | ||
<Span Text="Green, italic" | ||
TextColor="Green" | ||
TextDecorations="None" | ||
FontAttributes="Italic"/> | ||
<Span Text=" " | ||
TextDecorations="None"/> | ||
<Span FontAttributes="Bold" | ||
TextColor="Red" | ||
TextDecorations="Strikethrough" | ||
Text="Red, bold, strikethrough"/> | ||
<Span Text=" " | ||
TextDecorations="None"/> | ||
<Span TextColor="Black" | ||
FontFamily="FA" | ||
Text=""/> | ||
</FormattedString> | ||
</Label.FormattedText> | ||
</Label> | ||
</ContentPage> |
12 changes: 12 additions & 0 deletions
12
src/Controls/tests/TestCases.HostApp/Issues/Issue21034.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, 21034, "Child Span does not inherit TextColor or FontAttributes from parent Label", PlatformAffected.Android | PlatformAffected.iOS)] | ||
public partial class Issue21034 : ContentPage | ||
{ | ||
public Issue21034() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21034.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,23 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue21034 : _IssuesUITest | ||
{ | ||
public Issue21034(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Child Span does not inherit TextColor or FontAttributes from parent Label"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Label)] | ||
public void SpanShouldInheritLabelsProperties() | ||
{ | ||
App.WaitForElement("Label"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+4.71 KB
...s/TestCases.WinUI.Tests/snapshots/windows/SpanShouldInheritLabelsProperties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.9 KB
...s/tests/TestCases.iOS.Tests/snapshots/ios/SpanShouldInheritLabelsProperties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.