-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codegen): markup-ext improper cast for nullable value-type dp
- Loading branch information
Showing
7 changed files
with
71 additions
and
13 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
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
11 changes: 11 additions & 0 deletions
11
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Markup/MarkupExtension_CodegenTypeCast.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,11 @@ | ||
<Page x:Class="Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Markup.MarkupExtension_CodegenTypeCast" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Markup"> | ||
<StackPanel> | ||
<local:AlreadyCheckedBox x:Name="SUT" | ||
x:FieldModifier="Public" | ||
IsChecked="{local:ReturnNull}" /> | ||
<local:AlreadyCheckedBox x:Name="Control" x:FieldModifier="Public" /> | ||
</StackPanel> | ||
</Page> |
26 changes: 26 additions & 0 deletions
26
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Markup/MarkupExtension_CodegenTypeCast.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,26 @@ | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Markup; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Markup; | ||
|
||
public sealed partial class MarkupExtension_CodegenTypeCast : Page | ||
{ | ||
public MarkupExtension_CodegenTypeCast() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
public partial class AlreadyCheckedBox : CheckBox | ||
{ | ||
public AlreadyCheckedBox() | ||
{ | ||
// setting a default value, so we may observe ReturnNullExtension working or not. | ||
this.IsChecked = true; | ||
} | ||
} | ||
|
||
public class ReturnNullExtension : MarkupExtension | ||
{ | ||
protected override object ProvideValue() => null; | ||
} |