Skip to content

Commit 9482793

Browse files
Addressed review corrections
1 parent a23873c commit 9482793

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

MAUI/TreeView/empty-view.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@ documentation: ug
99

1010
# Empty view in .NET MAUI TreeView (SfTreeView)
1111

12-
The `SfTreeView` control allows you to display and customize the empty view content when no data is available. The `EmptyView` property can be set to a string or a view, which will be displayed when the `ItemsSource` is null or when the collection bound to the `ItemsSource` is empty and `EmptyViewTemplate` is used to customize the appearance of `EmptyView`.
12+
The `SfTreeView` control allows you to display and customize the empty view content when no data is available. The `EmptyView` property can be set to either a string or a view, and it will be displayed when the `ItemsSource` is empty or null, or the `Nodes` collection is empty. `EmptyViewTemplate` is used to customize the appearance of `EmptyView`.
1313

14-
## Display a string when treeView has no items
14+
## Display a string when TreeView has no items
1515

16-
The `EmptyView` property can be set to a string.
16+
The `EmptyView` property in `SfTreeView` can be set to a string, which will be displayed when no items are present in the tree view.
1717

1818
{% tabs %}
19-
{% highlight xaml %}
19+
{% highlight xaml hl_lines="4" %}
2020
<ContentPage xmlns:syncfusion="clr-namespace:Syncfusion.Maui.TreeView;assembly=Syncfusion.Maui.TreeView">
2121
<syncfusion:SfTreeView x:Name="treeView"
2222
ItemsSource="{Binding Items}"
2323
EmptyView="No Items">
2424
</syncfusion:SfTreeView>
2525
</ContentPage>
2626
{% endhighlight %}
27-
{% highlight c# %}
27+
{% highlight c# hl_lines="3" %}
28+
SfTreeView treeView = new SfTreeView();
29+
treeView.ItemsSource = viewModel.Items;
2830
treeView.EmptyView = "No Items";
2931
{% endhighlight %}
3032
{% endtabs %}
3133

32-
## Display views when treeView has no items
34+
## Display views when TreeView has no items
3335

34-
The `EmptyView` property can be set to a view.
36+
The `SfTreeView` control uses the `EmptyView` property to display a custom view when the tree has no items.
3537

3638
{% tabs %}
3739
{% highlight xaml hl_lines="4" %}
@@ -76,6 +78,6 @@ treeView.EmptyView = new Border
7678
{% endhighlight %}
7779
{% endtabs %}
7880

79-
N> View displayed by the `EmptyView` can be a single view or a view that contains multiple child views.
81+
N> The view displayed by the `EmptyView` can be a single view or a view that includes multiple child views.
8082

8183
![EmptyView in .NET MAUI TreeView](images/empty-view/maui-treeview-empty-view.gif)

0 commit comments

Comments
 (0)