-
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.
[C] fix BP declaration for Border (#8047)
- fixes #7744
- Loading branch information
1 parent
3113d68
commit f3371ba
Showing
3 changed files
with
57 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
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" | ||
xmlns:local="clr-namespace:Microsoft.Maui.Controls.Xaml.UnitTests" | ||
x:Class="Microsoft.Maui.Controls.Xaml.UnitTests.Maui7744"> | ||
|
||
<StackLayout> | ||
<Border x:Name="border0" StrokeShape="RoundRectangle 1,1,1,1"/> | ||
<Border x:Name="border1"> | ||
<Border.Style> | ||
<Style TargetType="Border"> | ||
<Setter Property="StrokeShape" Value="RoundRectangle 1,1,1,1"/> | ||
</Style> | ||
</Border.Style> | ||
</Border> | ||
</StackLayout> | ||
</ContentPage> |
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 Microsoft.Maui.ApplicationModel; | ||
using Microsoft.Maui.Controls.Core.UnitTests; | ||
using Microsoft.Maui.Controls.Shapes; | ||
using Microsoft.Maui.Devices; | ||
using NUnit.Framework; | ||
|
||
namespace Microsoft.Maui.Controls.Xaml.UnitTests | ||
{ | ||
public partial class Maui7744 : ContentPage | ||
{ | ||
public Maui7744() => InitializeComponent(); | ||
public Maui7744(bool useCompiledXaml) | ||
{ | ||
//this stub will be replaced at compile time | ||
} | ||
|
||
[TestFixture] | ||
class Test | ||
{ | ||
[SetUp] public void Setup() => AppInfo.SetCurrent(new MockAppInfo()); | ||
[TearDown] public void TearDown() => AppInfo.SetCurrent(null); | ||
|
||
[Test] | ||
public void ConvertersAreExecutedWhileApplyingSetter([Values(false, true)] bool useCompiledXaml) | ||
{ | ||
var page = new Maui7744(useCompiledXaml); | ||
Assert.That(page.border0.StrokeShape, Is.TypeOf<RoundRectangle>()); | ||
Assert.That(page.border1.StrokeShape, Is.TypeOf<RoundRectangle>()); | ||
} | ||
} | ||
} | ||
} |