Skip to content

This sample demonstrates how to build a Book Library app using the .NET MAUI ListView and DataForm controls in a .NET MAUI application.

Notifications You must be signed in to change notification settings

SyncfusionExamples/Book-Library-App-using-.NET-MAUI-ListView-and-DataForm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Book Library App using .NET MAUI ListView and DataForm

This sample demonstrates how to build a Book Library app using the .NET MAUI ListView and DataForm controls in a .NET MAUI application.

Sample

    <listview:SfListView x:Name="listView" Grid.Row="1" ItemsSource="{Binding Books}"
                 AutoFitMode="Height" ItemSize="200" TapCommand="{Binding TapCommand}">
    <listview:SfListView.ItemTemplate>
        <DataTemplate>
            <Grid RowSpacing="0" Padding="8,12,8,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="1" />
                </Grid.RowDefinitions>
                <Grid RowSpacing="0" Padding="0,0,8,10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Image Grid.Column="0" Grid.Row="0" Source="{Binding Image}"
                       HorizontalOptions="Start" VerticalOptions="Start" 
                       HeightRequest="100" WidthRequest="90"/>
                    <Grid Grid.Row="0" Grid.Column="1" RowDefinitions="Auto,Auto,Auto" 
                      RowSpacing="5">
                        <Label Text="{Binding Name}" FontAttributes="Bold" 
                           FontSize="16" TextColor="#474747"/>
                        <Label Text="{Binding Author}" Grid.Row="1" FontSize="14" 
                           Opacity="0.67" TextColor="#474747" />
                        <Label Text="{Binding Description}" Grid.Row="2" 
                           Opacity=" 0.54" TextColor="#474747" FontSize="13"
                           LineBreakMode="WordWrap" CharacterSpacing="0.1"/>
                    </Grid>
                </Grid>
                <BoxView Grid.Row="1" Margin="5,0,0,0" HeightRequest="1" 
                     Opacity="0.75" BackgroundColor="#CECECE" />
            </Grid>
        </DataTemplate>
    </listview:SfListView.ItemTemplate>
</listview:SfListView>

Requirements to run the demo

To run the demo, refer to System Requirements for .NET MAUI

Troubleshooting:

Path too long exception

If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

License

Syncfusion has no liability for any damage or consequence that may arise from using or viewing the samples. The samples are for demonstrative purposes. If you choose to use or access the samples, you agree to not hold Syncfusion liable, in any form, for any damage related to use, for accessing, or viewing the samples. By accessing, viewing, or seeing the samples, you acknowledge and agree Syncfusion's samples will not allow you seek injunctive relief in any form for any claim related to the sample. If you do not agree to this, do not view, access, utilize, or otherwise do anything with Syncfusion's samples

About

This sample demonstrates how to build a Book Library app using the .NET MAUI ListView and DataForm controls in a .NET MAUI application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages