Forum Xamarin Xamarin.Forms

When I Try to Create a Custom ViewCell I Get an Error?

DyaryDyary Member ✭✭
edited August 2018 in Xamarin.Forms

Hi. I need to create a Custom VewCell so that i can reuse the code within it multiple times.
but i get these erros :

Error CS0234 The type or namespace name 'DateCell' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?)

Error XLS0414 The type 'DateCell' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

This is the code for the Xaml that i use :

            <?xml version="1.0" encoding="utf-8" ?>

                <StackLayout Orientation="Horizontal" Padding="14, 0">
                    <Label Text="Time" VerticalOptions="Center"/>
                    <TimePicker HorizontalOptions="EndAndExpand" />


and here is the code behind

                    using System;
                    using System.Collections.Generic;

                    using Xamarin.Forms;

                    namespace App31.Extensions

                        public partial class DateCell : ViewCell
                            public DateCell()


How can I resolve this issue?
Thanks .

Best Answer


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    It would also help if you could fix up your post to include mardown so the site parser doesn't try to render the code you're including.

  • DyaryDyary Member ✭✭

    Thank you so much ClintB for your help , that resolved the problem.
    Also thanks to ClintStLaurent for the heads-up.

Sign In or Register to comment.