We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
BindClass
anchor
Continuing from #15711 (reply in thread)
Current signature is:
public static class StyledElementExtensions { public static IDisposable BindClass(this StyledElement target, string className, IBinding source, object anchor) => ClassBindingManager.Bind(target, className, source, anchor); }
anchor doesn't seem to be used anymore after the 11.1 bindings refactor. So I propose:
StyledElementExtensions.BindClass
object? anchor
ClassBindingManager.Bind
Alternative:
CS8625: Cannot convert null literal to non-nullable reference type
var text = new TextBlock(); var mb = new MultiBinding() { Bindings = [new Binding("IsA"), new Binding("IsB")], Converter = BoolConverters.And }; text.BindClass("big", mb, null);
No nullable warning. No need to use null!.
null!
Current master
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Continuing from #15711 (reply in thread)
Current signature is:
anchor
doesn't seem to be used anymore after the 11.1 bindings refactor. So I propose:StyledElementExtensions.BindClass
toobject? anchor
ClassBindingManager.Bind
's anchor parameter toobject? anchor
(or removing it, since it's internal)Alternative:
StyledElementExtensions.BindClass
withoutanchor
. Mark other overload as obsolete to be removed in v12.ClassBindingManager.Bind
's anchor parameter toobject? anchor
(or removing it, since it's internal)To Reproduce
CS8625: Cannot convert null literal to non-nullable reference type
Expected behavior
No nullable warning. No need to use
null!
.Avalonia version
Current master
OS
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: