RegisterView() public static method

public static RegisterView ( Type type, Type viewType ) : void
type System.Type
viewType System.Type
return void
Exemplo n.º 1
0
        public static void InitializeViewContainer()
        {
            //Integral types
            ViewContainer.RegisterView(typeof(sbyte), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(byte), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(char), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(short), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(ushort), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(int), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(uint), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(long), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(ulong), typeof(StringCellView));

            //float types
            ViewContainer.RegisterView(typeof(float), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(double), typeof(StringCellView));
            ViewContainer.RegisterView(typeof(decimal), typeof(StringCellView));

            //bool
            ViewContainer.RegisterView(typeof(bool), typeof(BooleanCellView));

            //Reference types
            ViewContainer.RegisterView(typeof(object), typeof(ObjectCellView <object>));
            ViewContainer.RegisterView(typeof(string), typeof(StringCellView));

            //Enum
            ViewContainer.RegisterView(typeof(Enum), typeof(ListCellView));

            //IEnumerable
            ViewContainer.RegisterView(typeof(IEnumerable), typeof(ListCellView));
            ViewContainer.RegisterView(typeof(IEnumerable <object>), typeof(ListCellView));

            //Other
            ViewContainer.RegisterView(typeof(UIView), typeof(ObjectCellView <UIView>));
            ViewContainer.RegisterView(typeof(ICommand), typeof(CommandCellView));
            ViewContainer.RegisterView(typeof(DateTime), typeof(DateCellView));
            ViewContainer.RegisterView(typeof(NSDate), typeof(DateCellView));
        }
Exemplo n.º 2
0
 public CellViewTemplate()
 {
     ViewContainer.RegisterView(GetType(), CellViewType);
 }
Exemplo n.º 3
0
 public CellViewTemplate(Type valueConverterType) : base(valueConverterType)
 {
     ViewContainer.RegisterView(GetType(), CellViewType);
 }
 public static void InitializeViewContainer()
 {
     ViewContainer.RegisterView(typeof(Uri), typeof(HtmlCellView));
     ViewContainer.RegisterView(typeof(CLLocationCoordinate2D), typeof(MapCellView));
     ViewContainer.RegisterView(typeof(IEnumerable <CLLocationCoordinate2D>), typeof(MapCellView));
 }