Skip to content

Handle {x:Null} for Style's BasedOn Binding - #4225

Merged
jeromelaban merged 4 commits into
unoplatform:masterfrom
kazo0:bug/style-null
Oct 7, 2020
Merged

jeromelaban merged 4 commits into
unoplatform:masterfrom
kazo0:bug/style-null

Conversation

@kazo0

@kazo0 kazo0 commented Oct 6, 2020

Copy link
Copy Markdown
Contributor

closes #2470

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Error in code generation when binding Style's BaseOn to x:Null

What is the new behavior?

Binding of x:Null will now properly generate null

PR Checklist

Please check if your PR fulfills the following requirements:

@kazo0
kazo0 requested a review from a team October 6, 2020 22:19
@gitpod-io

gitpod-io Bot commented Oct 6, 2020 •

Copy link
Copy Markdown

@kazo0

kazo0 commented Oct 6, 2020

Copy link
Copy Markdown
Contributor Author

Not sure if this is the proper approach here, still new to the code generation. Would this require a more custom approach at line 1358?

@kazo0 kazo0 changed the title Handle Handle {x:Null} for Style's BaseOn Binding Oct 6, 2020
@kazo0 kazo0 changed the title Handle {x:Null} for Style's BaseOn Binding Handle {x:Null} for Style's BasedOn Binding Oct 6, 2020
@jeromelaban

Copy link
Copy Markdown
Member

Thanks for the PR! For the test, adding a UI Test is probably too heavy and it would be best to add a Unit Test in this project, which you can run by opening Uno.UI-UnitTests-only.slnf. You can add a xaml file similar to the one you added, where you can get the Style from the control and validate that the BasedOn property is null.

@jeromelaban jeromelaban left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks Steve!

@jeromelaban
jeromelaban merged commit 2e971d5 into unoplatform:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Style.BasedOn to be set to {x:Null}

2 participants