Let's Replicate an Online Store UI in Xamarin.Forms | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (182).NET Core  (26).NET MAUI  (234)Angular  (115)ASP.NET  (49)ASP.NET Core  (80)ASP.NET MVC  (85)Azure  (42)Black Friday Deal  (1)Blazor  (243)BoldSign  (15)DocIO  (24)Essential JS 2  (108)Essential Studio  (198)File Formats  (73)Flutter  (141)JavaScript  (227)Microsoft  (121)PDF  (86)Python  (1)React  (107)Streamlit  (1)Succinctly series  (131)Syncfusion  (990)TypeScript  (32)Uno Platform  (3)UWP  (3)Vue  (45)Webinar  (54)Windows Forms  (59)WinUI  (72)Word  (18)WPF  (165)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (155)Chart of the week  (62)Cloud  (16)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (74)Development  (697)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (47)Extensions  (31)File Manager  (8)Gantt  (23)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (532)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (48)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (428)Uncategorized  (68)Unix  (2)User interface  (67)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (651)What's new  (355)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Let's Replicate an Online Store UI in Xamarin.Forms

Let’s Replicate an Online Store UI in Xamarin.Forms

Howdy! In this blog, we’ll replicate an online store UI based on this Dribbble design.

We are going to develop the UI based on the steps specified in the following image.

Replicating an Online Store UI in Xamarin.Forms
Replicating an Online Store UI in Xamarin.Forms

Before starting, let’s highlight some important points. In this blog post, we will learn to:

Let’s code!

Main layout

Let’s start by organizing the main layout of the UI.

I choose the DataGrid in this case, and we will divide the entire screen into two rows:

  • Row 1: Contains the main image.
  • Row 2: Contains the frame displaying all the product information and the floating button.

Refer to the following code example.

<!-- Main layout-->
 <Grid RowDefinitions="Auto,*"
     <!-- Here you must add the code blocks explained in steps 1 and 2.-->

Important Note: Here, we have included RowSpacing=”0″ and BackgroundColor=”White” to make the curve layout look smooth and natural. 

Step 1: Main picture

Step 1: Main picture

Let’s render the following three components:

  • Left and right buttons: This first block will be contained in a grid with two columns defined with proportional values. We will add a button in each column.
  • Main image: To render the bottom-right rounded edge, use the PancakeView. Add the image covering both columns of the grid (using Grid.ColumnSpan=”2″).

Refer to the following code.

<!-- 1. Main picture-->
 <PanCake:PancakeView Grid.Row="0" CornerRadius="0,0,0,60">
   <Grid ColumnDefinitions="*,*">
     <Image Grid.Column="0" Grid.ColumnSpan="2" HeightRequest="280" Aspect="AspectFill" Source="MainImage"/>
       <Button Grid.Column="0" ImageSource="Arrow" BackgroundColor="Transparent" Margin="20,40" VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="50" WidthRequest="50" CornerRadius="14" BorderColor="Silver" BorderWidth="1"/>
       <Button Grid.Column="1" ImageSource="Points" BackgroundColor="Transparent" Margin="20,40" VerticalOptions="Start" HorizontalOptions="End" HeightRequest="50" WidthRequest="50" CornerRadius="14" BorderColor="Silver" BorderWidth="1"/>
<!-- You must write here what is explained in the next code block -->

Step 2: Frame and floating button

Step 2: Frame and floating button

This second step is necessary to achieve the effect of continuous curves in our design.

Grid to cover the detailed information

We will start by adding a DataGrid control, followed by the PancakeView. Render the upper-left edge as curved in shape so that the continuity with the previous step is noticeable.

The grid has a background color the same as the image has on the left side. This is important to achieve the expected design and the feel of continuity.

Add a DataGrid control inside the PancakeView to add all the product details. Set the BackgroundColor property to white to reflect the division of the curves.

Refer to the following code example.

<!--2. Detail information-->
 <Grid Grid.Row="1" HorizontalOptions="FillAndExpand" BackgroundColor="#c6dad4">
   <PanCake:PancakeView CornerRadius="60,0,0,0">
     <Grid RowDefinitions="*" BackgroundColor="White">
        <!-- You must write here what is explained in the next code block -->

Floating button

As you can see, we have a square button that floats. Let’s see how to create this.

First, within the grid of the previous code block, add a <ScrollView> tag. Within this layout, add another DataGrid control to structure the desired information.

Refer to the following code example.

<ScrollView Grid.Row="0" Padding="0,0,0,90" VerticalScrollBarVisibility="Never">
 <Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,*" Padding="30">
   <!-- You must write here what is explained from step number 3 -- >
<!-- Add floating button here -->

Now, add the floating button below the ScrollView in the same row that you added the ScrollView. This way, the content will be placed inside the layout, and the button will be placed outside but in the same line. That’s why you see it floating.

Note: For more details, refer to the Simple way to create a Floating Button in Xamarin.Forms blog by Leomaris Reyes.

<!--Float Button-->
 <Button Grid.Row="0" Text="+" FontAttributes="Bold" FontSize="35" BackgroundColor="#fabfbc" BorderRadius="23" TextColor="White" HorizontalOptions="Center" WidthRequest="75" HeightRequest="75" Margin="0,0,20,22" VerticalOptions="End"/>

Step 3: Product details

Step 3: Product details

Let’s continue adding the details of the product.


Refer to the following code example to render the label.

 <Label Grid.Row="0"  Grid.Column="0" Grid.ColumnSpan="2"  FontSize="21" FontAttributes="Bold" Text="Wired On-Ear Headphones" TextColor="#665a5a"/>

<!-- You must write here what is explained in the next code block -->


Let’s add the Syncfusion Xamarin.Forms NumericUpDown control to design the counter.

First, add the Syncfusion.Xamarin.SfNumericUpDown NuGet package to all your projects.

Note: For more details, refer to Xamarin.Forms NumericUpDown control documentation.

Syncfusion.Xamarin.SfNumericUpDown NuGet package

Then, add the Syncfusion.SfNumericUpDown.XForms namespace in your XAML file.

xmlns:updown="clr-namespace:Syncfusion.SfNumericUpDown.XForms;assembly=Syncfusion.SfNumericUpDown.XForms"    x:Class="OnlineStoreApp.Views.DetailPage">

That’s all! To add the NumericUpDown control, you now just have to use the alias given to the namespace like in the following code example.

<!--Counter & price-->
 <updown:SfNumericUpDown Grid.Row="1" Grid.Column="0" Value="3" HeightRequest="50" Margin="0,15" BackgroundColor="#f6e1e1" SpinButtonAlignment="Both" TextAlignment="Center">
   <updown:UpDownButtonSettings BackgroundColor="#f8e7e9"/>
   <updown:UpDownButtonSettings BackgroundColor="#f8e7e9"/>
<!-- You must write here what is explained in the next code block -->


Let’s render the price details. Use the FormattedText to create the same text with different characteristics in the same label.

<Label Grid.Row="1" Grid.Column="1" VerticalTextAlignment="Center" HorizontalTextAlignment="End">
     <Span Text="$" FontSize="18"/>
      <Span Text="26." FontSize="25" FontAttributes="Bold" />
     <Span Text="99" FontSize="18" />
<!-- You must write here what is explained in the next code block -->


Refer to the following code example to render the description section.

 <Label Grid.Row="2"  Grid.Column="0" Grid.ColumnSpan="2" TextColor="Silver" LineHeight="1.2" Text="Maximizing your personal audio experience has never been easier than with Our Monitor headphones. Built with combat and goodness in mind, there's no need to compromise."/>
<!-- You must write here what is explained in the next code block -->

Step 4: Related products

Step 4: Related products

 Finally, let’s add the related products.


Refer to the following code to render the title.

<!--Related Products details-->
  <Label Grid.Row="3" Grid.Column="0" FontAttributes="Bold" Text="Related Products" TextColor="#665a5a" Margin="0,20,0,15"/>
  <Label Grid.Row="3" Grid.Column="1" Text="View all"  HorizontalOptions="End"  TextColor="#d4acaa" Margin="0,20,0,15"/>

<!-- You must write here what is explained in the next code block -->

Related products list

We use the CollectionView to display the list. We will use a Frame to make the round edges of each image in the list.

<CollectionView Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Never"
                ItemsSource="{Binding products}"
      <Grid Padding="1,0,5,10">
       <Frame Grid.Column="0" BorderColor="Transparent" HorizontalOptions="Start" VerticalOptions="Start" WidthRequest="110" HasShadow="False"  CornerRadius="10" Padding="0" IsClippedToBounds="True">
        <Image Source="{Binding Picture}" Aspect="Fill" />
<!-- You must write here what is explained in the next code block -->

Main features and description

Refer to the following code example to render the main features and descriptions of the products.

<!-- Main features & description-->
  <Label Grid.Row="5" Grid.Column="0" FontAttributes="Bold" Text="Main Features" TextColor="#665a5a"/>
  <Label Grid.Row="6"  Grid.Column="0" Grid.ColumnSpan="2" TextColor="Silver" LineHeight="1.5" Text="Tangle-free - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "/>

And our UI is done! You can see the full screen we built for both Android and iOS devices.

Replicating an Online Store UI in Xamarin.Forms
Replicating an Online Store UI in Xamarin.Forms

GitHub reference

To see the complete code, refer to our Online Store UI in Xamarin.Forms demo on GitHub.


Thanks for reading! In this blog, we have seen how to replicate an online store UI in Xamarin.Forms with Syncfusion UI controls. Try out the steps here and build your stunning online store UI!

Syncfusion’s Xamarin suite offers over 150 UI controls, from basic editors to powerful, advanced controls like ChartsListView, and Rich Text Editor. Use them to build elite applications!

For questions, you can contact us through our support forumsupport portal, or feedback portal. We are always happy to assist you!

Related blogs


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed