Change Expand/collapse animation css settings
Hello there
Is it possible to alter the Blazor SfTreeView animation Expand/Collapse speed in css?
Im working with the basic sample in your docs.
Can you point me to the appropriate documentaion too.
Many thanks
Martin
SIGN IN To post a reply.
3 Replies
IL
Indhumathy Loganathan
Syncfusion Team
September 6, 2021 12:23 PM UTC
Hi Martin,
Greetings from Syncfusion support.
We have validated your requirement in TreeView component. We understand that you want to speed up the duration time taken to perform expand or collapse of TreeView nodes. In TreeView, we have TreeViewNodeAnimationSettings API which includes TreeViewAnimationExpand and TreeViewAnimationCollapse API.
Both collapse and expand API includes below properties.
Duration - Specifies the duration to animate.
Easing - Specifies the animation timing function.
Effect - Specifies the type of animation.
For example,
|
<TreeViewNodeAnimationSettings>
<TreeViewAnimationExpand Duration="400" Effect="Syncfusion.Blazor.AnimationEffect.SlideDown" Easing="Linear"></TreeViewAnimationExpand>
<TreeViewAnimationCollapse Duration="400" Effect="Syncfusion.Blazor.AnimationEffect.SlideUp" Easing="Linear"></TreeViewAnimationCollapse>
</TreeViewNodeAnimationSettings> |
For your requirement, we have speed up the Duration time for both expand and collapse. Refer to the below code snippet.
|
<SfTreeView @ref="treeview" TValue="MailItem">
<TreeViewFieldsSettings TValue="MailItem" Id="Id" DataSource="@MyFolder" Text="FolderName" ParentID="ParentId" HasChildren="HasSubFolders" Expanded="Expanded"></TreeViewFieldsSettings>
<TreeViewNodeAnimationSettings>
<TreeViewAnimationExpand Duration="100"></TreeViewAnimationExpand>
<TreeViewAnimationCollapse Duration="100"></TreeViewAnimationCollapse>
</TreeViewNodeAnimationSettings>
</SfTreeView> |
You can find the sample demonstrating the solution from below link.
To know more about the Blazor TreeView component, refer to the below links.
API reference: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfTreeView-1.html
Please let us know if you need any further assistance.
Regards,
Indhumathy L
MM
Martin McCarrick
September 6, 2021 04:32 PM UTC
Thank you so much.
Your solution worls perfectly, I really appreciate your help.
Just one thing, looking at the TreeViewAnimationExpand class I cant see the Properties (Duration, Easing & Effect) listed, normally we see the properties of a class, why are they not in the docs? and where are they and how would I find them?
Kind regards
Martin
KR
Keerthana Rajendran
Syncfusion Team
September 7, 2021 06:05 AM UTC
Hi Martin,
Most welcome. We are glad to hear that the provided suggestions helped you. We have considered your feedback about documentation and we will publish this scenario(How to customize animation settings with Blazor TreeView) as a KB in future.
Please get back to us if you need any further assistance.
Regards,
Keerthana R.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
MM Martin McCarrick
- Sep 5, 2021 04:20 PM UTC
- Sep 7, 2021 06:05 AM UTC