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/ListView/viewappearance.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,22 @@ public class MainPage : ContentPage
101
101
102
102

103
103
104
+
## Setting DisplayMemberPath
105
+
106
+
The `DisplayMemberPath` property in the SfListView provides a simple and efficient way to display a specific property from business objects without creating custom item template. This feature is especially useful for simple lists where you want to display a single property without defining a custom template.
107
+
108
+
{% tabs %}
109
+
{% highlight xaml tabtitle="MainPage.xaml" %}
110
+
<syncfusion:SfListView x:Name="listView"
111
+
DisplayMemberPath="BookName" />
112
+
{% endhighlight %}
113
+
{% highlight c# tabtitle="MainPage.xaml.cs" %}
114
+
listView.DisplayMemberPath = "BookName";
115
+
{% endhighlight %}
116
+
{% endtabs %}
117
+
118
+
N> The `ItemTemplate` property takes precedence over `DisplayMemberPath`. If both are set, `ItemTemplate` will be used.
119
+
104
120
## Horizontal ListView
105
121
106
122
The SfListView allows you to layout every item in the [SfListView.ItemsSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_ItemsSource) property either in `Vertical` or `Horizontal` orientation by setting the [SfListView.Orientation](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_Orientation). The default orientation is `Vertical`.
0 commit comments