Replies: 1 comment 1 reply
-
I feel like it could be too much for the selectors syntax to allow any kind of markup extensions. Also it doesn't match by schematics, as we don't have a "markup" here, it's only a selector - a predicate/filter. I would split it into smaller ideas:
The problem with Probably |
Beta Was this translation helpful? Give feedback.
-
As discussed in #8793, there is no performance issue to use x:static to standardize part names. But it's useless for selector because selector doesn't support markup extension. So is it possible to add markup extension support for selector?
Grammar:
Selector="^:pointerover /template/ ContentPresenter#{x:Static Button.PART_ContentPresenter}"
I checked several parts in source code, and I think it's possible
SelectorGrammar.Parse
, add new state and corresponding handling ofState.Name
followed by{
.ISyntax
asReferenceNameSyntax
AvaloniaXamlIlSelectorTransformer
, add transform handling ofReferenceNameSyntax
with existingTypeResolver
.The only drawback is that it's impossible to test if two NameSyntax/ReferenceNameSyntax are actually equal.
Beta Was this translation helpful? Give feedback.
All reactions