This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS, UWP] Background Brush issues (#14614)
* Cannot reproduce the issue, just add a sample * Added implicit conversion from Color to SolidColorBrush Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
- Loading branch information
1 parent
1b0d8f2
commit 3dcfa50
Showing
6 changed files
with
147 additions
and
1 deletion.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13930.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,34 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<local:TestContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Test 13930" xmlns:local="using:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue13930"> | ||
<local:TestContentPage.Resources> | ||
<ResourceDictionary> | ||
|
||
<Color x:Key="CustomColor">#2B0B98</Color> | ||
|
||
</ResourceDictionary> | ||
</local:TestContentPage.Resources> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="If the Entry have a background color, the test has passed."/> | ||
<StackLayout | ||
Padding="12"> | ||
<Entry | ||
Placeholder="Placeholder" | ||
Background="{StaticResource CustomColor}"/> | ||
<Entry | ||
Placeholder="Placeholder" | ||
IsEnabled="False" | ||
Background="{StaticResource CustomColor}"/> | ||
</StackLayout> | ||
</StackLayout> | ||
</local:TestContentPage> |
31 changes: 31 additions & 0 deletions
31
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13930.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,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Threading.Tasks; | ||
using Xamarin.Forms.CustomAttributes; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 13930, | ||
"[Bug] Entry Background doesn't work to set color", | ||
PlatformAffected.iOS)] | ||
public partial class Issue13930 : TestContentPage | ||
{ | ||
public Issue13930() | ||
{ | ||
#if APP | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue14613.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,40 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<local:TestContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Test 14613" xmlns:local="using:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue14613"> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="If Frame have a red background color in all the cases, the test has passed."/> | ||
<StackLayout | ||
Padding="12"> | ||
<Label | ||
TextColor="White" | ||
Text="Using BackgroundColor"/> | ||
<Frame | ||
Background="Red"> | ||
<Label | ||
TextColor="White" | ||
Text="Color"/> | ||
</Frame> | ||
<Label | ||
Text="Using Background"/> | ||
<Frame> | ||
<Frame.Background> | ||
<SolidColorBrush | ||
Color="Red" /> | ||
</Frame.Background> | ||
<Label | ||
TextColor="White" | ||
Text="SolidColorBrush"/> | ||
</Frame> | ||
</StackLayout> | ||
</StackLayout> | ||
</local:TestContentPage> |
31 changes: 31 additions & 0 deletions
31
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue14613.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,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Threading.Tasks; | ||
using Xamarin.Forms.CustomAttributes; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 14613, | ||
"[Bug] Frame Background property not working", | ||
PlatformAffected.iOS)] | ||
public partial class Issue14613 : TestContentPage | ||
{ | ||
public Issue14613() | ||
{ | ||
#if APP | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
} | ||
} | ||
} |
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