-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Are threre any plans to support Effects and Behavior ? #46
Comments
Thanks! As for behaviors and effects - could you describe your use cases? Which behaviors, for which controls? I'm not sure how to support behaviors, as they are a bit foreign to Blazor. It would look nice to define them in markup, as you would do with XAML, but with Blazor that would require to create a separate Blazor component class for every possible behavior, and it doesn't seems like a great idea. Is that ok simply to expose that as <Entry Behaviors="_entryBehaviors" />
@code {
private Behavior[] _entryBehaviors = new[] { new MyFirstBehavior(), new MySecondBehavior() };
} Alternative option I thought about is to create some generic component to hold behavior value, so it would look like this: <Entry>
<Behaviors>
<BehaviorItem Type="MyFirstBehavior" />
<BehaviorItem Type="MySecondBehavior" />
</Behaviors>
</Entry> WDYT? |
As for Effects - all the above still applies, but additionally MAUI team doesn't recommend using them at all (they've only left them in MAUI to make transaction from XF easier), so I'm not sure if it makes sense to add the support for them at all here. Again, please let me know your thoughts and use case. |
Thanks for kind replying. Here is my usecase. case 1I just wanted a declarative animation like the following library or react/flutter/swiftui. https://github.com/jsuarezruiz/MauiAnimation My team uses React a lot and recently started using Blazor, so I'm not familiar with Blazor or MAUI. For HTML with CSS Transitions it's easy. case 2I tried to implement custom plat form effect such as the Windows mouse pointer, Context menus , but it will be resolved once the added features with NET7 RC1 are supported. Thanks. |
As for behavior, I still don't really understand the use case :( Could you give a XAML example how would you replace |
I have merged the support for Behaviors, it will be included in the next release, but you can try it with the nightly release. While no built-in behaviors are provided, you can generate bindings for the third party behaviors via component generator. You can take a look at the example here: |
I am not sure whether it makes any sense to support Effects. While they are still supported for compatibility, MAUI guys do not recommend using them. |
1.0 with Behaviors support is released to nuget, so I'm closing the issue. |
Thank you for Amazing project !
Currently, we should access to Shadows, Behaviors, and Effects via @ref and Element.NativeControl.
Any plans to implement it as an Attribute on Blazor element?
The text was updated successfully, but these errors were encountered: