You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAUI/TreeView/empty-view.md
+47-27Lines changed: 47 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,57 +85,77 @@ N> The view displayed by the `EmptyView` can be a single view or a view that inc
85
85
The `SfTreeView` control allows you to fully customize the empty view appearance by using the `EmptyViewTemplate` property. This property lets you define a custom view and style for the `EmptyView`.
filterItem.SetBinding(FilterItem.FilterProperty, new Binding
141
+
{
142
+
Source = filterText,
143
+
Path = "Text"
144
+
});
130
145
treeView.EmptyView = filterItem;
131
146
147
+
// Define the EmptyViewTemplate
132
148
treeView.EmptyViewTemplate = new DataTemplate(() =>
133
149
{
134
150
return new Border
135
151
{
136
-
...
152
+
...
137
153
};
138
154
});
139
155
140
156
{% endhighlight %}
141
157
{% endtabs %}
158
+
159
+
N>
160
+
* The `EmptyViewTemplate` will only be applied when the `EmptyView` property is explicitly defined. If `EmptyView` is not set, the template will not be displayed.
161
+
*`EmptyView` can be set to custom data model and the appearance of the `EmptyView` can be customized by using the `EmptyViewTemplate`.
0 commit comments