Repository navigation
[Closed] Behaviors extension to VisualElementExtensions #28
Closed
bijington
started this conversation in
New Feature Discussions
Replies: 3 comments 1 reply
|
We can have both, that way if the dev just wants to add one behavior they will not pay for the array allocation. |
0 replies
|
Thanks Shaun + Pedro! I think this is ready to be promoted to a Proposal! |
1 reply
|
Closed and answered |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like to propose that we add a
WithBehavior(this VisualElement visualElement, Behavior behavior)extension that will add the suppliedbehaviortovisualElement.Behaviors.It would then allow us to simplify this:
down to this:
Or better yet as @pictos has suggested we could make the method accept
paramsand the developer could hook up multiple behaviors (e.g.WithBehaviors(params Behavior[] behaviors))All reactions