You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining styles, if the user wants to reference the Styles owner in a setter, not providing a selector will reference the owner, in other words, it's implicit "self". Currently this doesn't work and crashes when set in xaml with the error Could not determine target type of Setter Line Y, position X
Describe the bug
When defining styles, if the user wants to reference the Styles owner in a setter, not providing a selector will reference the owner, in other words, it's implicit "self". Currently this doesn't work and crashes when set in xaml with the error
Could not determine target type of Setter Line Y, position X
To Reproduce
Add a style with no selector to a control.
Expected behavior
The setter finds the target type, which is the Styles owner, and sets IsVisible property on the control.
This issue can be worked around by setting
x:SetterTargetType
on the setter, but as there's an explicit test available for this in code form, xaml should also behave the same: https://github.com/AvaloniaUI/Avalonia/blob/master/tests/Avalonia.Base.UnitTests/Styling/StyleTests.cs#L81 .Avalonia version
11.2.3
OS
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: