Skip to content

Commit e354c2f

Browse files
authored
Update viewappearance.md
1 parent a8a69fd commit e354c2f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

MAUI/ListView/viewappearance.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,21 @@ public class MainPage : ContentPage
101101

102102
![MAUI ListView Data Template Selector](Images/appearance/maui-listview-applying-the-data-template-selector.jpg)
103103

104-
## DisplayMemberPath
104+
## Setting DisplayMemberPath
105105

106106
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.
107107

108108
{% tabs %}
109109
{% highlight xaml tabtitle="MainPage.xaml" %}
110-
<syncfusion:SfListView x:Name="listView" DisplayMemberPath="BookName" />
110+
<syncfusion:SfListView x:Name="listView"
111+
DisplayMemberPath="BookName" />
111112
{% endhighlight %}
112113
{% highlight c# tabtitle="MainPage.xaml.cs" %}
113-
listView.DisplayMemberPath = Model.BookName;
114+
listView.DisplayMemberPath = "BookName";
114115
{% endhighlight %}
115116
{% endtabs %}
116117

117-
N> The ItemTemplate property takes precedence over DisplayMemberPath. If both are set, ItemTemplate will be used.
118+
N> The `ItemTemplate` property takes precedence over `DisplayMemberPath`. If both are set, `ItemTemplate` will be used.
118119

119120
## Horizontal ListView
120121

0 commit comments

Comments
 (0)