Created
July 18, 2022 09:07
-
-
Save vnbaaij/5ee7cf01e52cd3579ac37866eb92323e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FluentTreeView OnExpandedChange="HandleOnExpandedChanged"> | |
<FluentTreeItem Text="Root item 1"> | |
<FluentTreeItem Text="Flowers"> | |
<FluentTreeItem Disabled="true" Text="Daisy" /> | |
<FluentTreeItem Text="Sunflower" /> | |
<FluentTreeItem Text="Rose" /> | |
</FluentTreeItem> | |
<FluentTreeItem Text="Nested item 2" /> | |
<FluentTreeItem Text="Nested item 3" /> | |
</FluentTreeItem> | |
<FluentTreeItem Text="Root item 2" > | |
<FluentDivider></FluentDivider> | |
<FluentTreeItem Text="Flowers"> | |
<FluentTreeItem Disabled="true" Text="Daisy" /> | |
<FluentTreeItem Text="Sunflower" /> | |
<FluentTreeItem Text="Rose" /> | |
</FluentTreeItem> | |
<FluentTreeItem Text="Nested item 2" /> | |
<FluentTreeItem Text="Nested item 3" /> | |
</FluentTreeItem> | |
<FluentTreeItem Text="Root item 3 - Leaf Erikson" /> | |
</FluentTreeView> | |
<p>Current expanded/collapsed tree item is @currentAffected?.Text</p> | |
@code { | |
FluentTreeItem? currentAffected; | |
private void HandleOnExpandedChanged(FluentTreeItem item) | |
{ | |
currentAffected = item; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment