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.
Fix Frame black background issue (#14623)
- Loading branch information
1 parent
4972ef0
commit 13cfd79
Showing
4 changed files
with
129 additions
and
12 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/FrameBackgroundIssue.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,87 @@ | ||
<?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="Frame Backgrund Issue" xmlns:local="using:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.FrameBackgroundIssue"> | ||
<ScrollView> | ||
<StackLayout | ||
Padding="12"> | ||
<Frame | ||
HasShadow="False" | ||
WidthRequest="150" | ||
BackgroundColor="LightGray" | ||
BorderColor="DarkGreen" | ||
CornerRadius="0" | ||
Padding="0"> | ||
<StackLayout> | ||
<BoxView | ||
BackgroundColor="GreenYellow" /> | ||
<Label | ||
Margin="8" | ||
Text="Frame using BackgroundColor" | ||
TextColor="Black" /> | ||
</StackLayout> | ||
</Frame> | ||
<Frame | ||
HasShadow="False" | ||
WidthRequest="150" | ||
BackgroundColor="LightGray" | ||
BorderColor="DarkGreen" | ||
CornerRadius="{Binding Source={x:Reference CornerRadiusSlider}, Path=Value}" | ||
Padding="0"> | ||
<StackLayout> | ||
<BoxView | ||
BackgroundColor="GreenYellow" /> | ||
<Label | ||
Margin="8" | ||
Text="Frame using BackgroundColor" | ||
TextColor="Black" /> | ||
</StackLayout> | ||
</Frame> | ||
<Frame | ||
HasShadow="False" | ||
WidthRequest="150" | ||
Background="LightGray" | ||
BorderColor="DeepPink" | ||
CornerRadius="0" | ||
Padding="0"> | ||
<StackLayout> | ||
<BoxView | ||
Background="LightPink" /> | ||
<Label | ||
Margin="8" | ||
Text="Frame using Background" | ||
TextColor="Black" /> | ||
</StackLayout> | ||
</Frame> | ||
<Frame | ||
HasShadow="False" | ||
WidthRequest="150" | ||
Background="LightGray" | ||
BorderColor="DeepPink" | ||
CornerRadius="{Binding Source={x:Reference CornerRadiusSlider}, Path=Value}" | ||
Padding="0"> | ||
<StackLayout> | ||
<BoxView | ||
Background="LightPink" /> | ||
<Label | ||
Margin="8" | ||
Text="Frame using Background" | ||
TextColor="Black" /> | ||
</StackLayout> | ||
</Frame> | ||
<Label | ||
FontSize="Micro" | ||
Text="Frame CornerRadius"/> | ||
<Slider | ||
x:Name="CornerRadiusSlider" | ||
Minimum="0" | ||
Maximum="48" | ||
Value="12"/> | ||
</StackLayout> | ||
</ScrollView> | ||
</local:TestContentPage> |
32 changes: 32 additions & 0 deletions
32
...n.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/FrameBackgroundIssue.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,32 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST | ||
[Category(UITestCategories.Frame)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 0, | ||
"[Bug] Frame Background not working", | ||
PlatformAffected.Android)] | ||
public partial class FrameBackgroundIssue : TestContentPage | ||
{ | ||
public FrameBackgroundIssue() | ||
{ | ||
#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