Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TemplateBinding and allow custom attributes in XamlValueConverter #14612

Merged

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Feb 14, 2024

Depends on kekekeks/XamlX#105

What does the pull request do?

  1. Allows TemplateBinding to be used outside of the ControlTemplate, but while inside of Style with /template/ or ControlTheme.
  2. Extends XamlX to support attributes in method/ctor parameters
  3. Minor related changes.

How was the solution implemented (if it's not obvious)?

Instead of hardcoding compiler for TemplateBinding support, I decided to go with a custom attribute usable by the compiler.
Unfortunately, using this attribute is rather complicated, as XamlX as for now didn't have IPropertyInfo alternative, so I had to implement it first on our backends. Following changes to XamlValueConverter and updating all places where it's used. Because of that PR is rather big, so I wouldn't expect it to be merged soon.

Checklist

Fixed issues

Fixes #14576
Fixes #2357

@maxkatz6 maxkatz6 requested review from grokys and kekekeks February 14, 2024 10:39
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044924-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

maxkatz6 added 2 commits March 1, 2024 17:07
…g-and-allow-attributes-in-XamlValueConverter

# Conflicts:
#	src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0045502-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 mentioned this pull request Apr 23, 2024
@maxkatz6 maxkatz6 added the bug label Apr 25, 2024
maxkatz6 and others added 7 commits May 10, 2024 00:00
…g-and-allow-attributes-in-XamlValueConverter

# Conflicts:
#	src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlTransformInstanceAttachedProperties.cs
#	src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github
#	src/tools/Avalonia.Generators/Compiler/RoslynTypeSystem.cs
@maxkatz6 maxkatz6 enabled auto-merge June 26, 2024 06:05
@maxkatz6 maxkatz6 disabled auto-merge June 26, 2024 06:19
@maxkatz6 maxkatz6 merged commit fbf559d into master Jun 26, 2024
4 of 10 checks passed
@maxkatz6 maxkatz6 deleted the fix-template-binding-and-allow-attributes-in-XamlValueConverter branch June 26, 2024 06:19
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049450-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants