예제 #1
0
        private void ProcessCell(TableSection tableSection, TableSectionControl section, BaseCell baseCell)
        {
            ICell cell = CellHelper.GetCell(this.Page, Me, section, baseCell);



            cell.Init();

            tableSection.Add(cell.GetCell());
        }
예제 #2
0
        public void Init()
        {
            CellHelper.DefaultViewProperties(this);

            Device.OnPlatform(
                Android: () =>
            {
                this.On = OnPlatformBool.GetAndroidValue(Me.On);

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetAndroidValue(Me.Text);
                }
            },
                iOS: () =>
            {
                this.On = OnPlatformBool.GetiOSValue(Me.On);

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetiOSValue(Me.Text);
                }
            },
                WinPhone: () =>
            {
                this.On = OnPlatformBool.GetWinPhoneValue(Me.On);

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetWinPhoneValue(Me.Text);
                }
            }
                );

            this.OnChanged += SwitchCell_OnChanged;
        }
예제 #3
0
        public void Init()
        {
            CellHelper.DefaultViewProperties(this);



            Device.OnPlatform(
                Android: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetAndroidValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.TextColor)))
                {
                    this.TextColor = Color.FromHex(OnPlatformString.GetAndroidValue(Me.TextColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Detail)))
                {
                    this.Detail = OnPlatformString.GetAndroidValue(Me.Detail);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.DetailColor)))
                {
                    this.DetailColor = Color.FromHex(OnPlatformString.GetAndroidValue(Me.DetailColor));
                }
            },
                iOS: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetiOSValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.TextColor)))
                {
                    this.TextColor = Color.FromHex(OnPlatformString.GetiOSValue(Me.TextColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Detail)))
                {
                    this.Detail = OnPlatformString.GetiOSValue(Me.Detail);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.DetailColor)))
                {
                    this.DetailColor = Color.FromHex(OnPlatformString.GetiOSValue(Me.DetailColor));
                }
            },
                WinPhone: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetWinPhoneValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.TextColor)))
                {
                    this.TextColor = Color.FromHex(OnPlatformString.GetWinPhoneValue(Me.TextColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Detail)))
                {
                    this.Detail = OnPlatformString.GetWinPhoneValue(Me.Detail);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.DetailColor)))
                {
                    this.DetailColor = Color.FromHex(OnPlatformString.GetWinPhoneValue(Me.DetailColor));
                }
            }
                );
        }
예제 #4
0
        public void Init()
        {
            CellHelper.DefaultViewProperties(this);

            this.Keyboard = CellHelper.GetKeyboard(Me.Keyboard);
            this.XAlign   = CellHelper.GetTextAlignment(Me.XAlign);

            Device.OnPlatform(
                Android: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Label)))
                {
                    this.Label = OnPlatformString.GetAndroidValue(Me.Label);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.LabelColor)))
                {
                    this.LabelColor = Color.FromHex(OnPlatformString.GetAndroidValue(Me.LabelColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetAndroidValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetAndroidValue(Me.Placeholder)))
                {
                    this.Placeholder = OnPlatformString.GetAndroidValue(Me.Placeholder);
                }
            },
                iOS: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Label)))
                {
                    this.Label = OnPlatformString.GetiOSValue(Me.Label);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.LabelColor)))
                {
                    this.LabelColor = Color.FromHex(OnPlatformString.GetiOSValue(Me.LabelColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetiOSValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetiOSValue(Me.Placeholder)))
                {
                    this.Placeholder = OnPlatformString.GetiOSValue(Me.Placeholder);
                }
            },
                WinPhone: () =>
            {
                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Label)))
                {
                    this.Label = OnPlatformString.GetWinPhoneValue(Me.Label);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.LabelColor)))
                {
                    this.LabelColor = Color.FromHex(OnPlatformString.GetWinPhoneValue(Me.LabelColor));
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Text)))
                {
                    this.Text = OnPlatformString.GetWinPhoneValue(Me.Text);
                }

                if (!String.IsNullOrEmpty(OnPlatformString.GetWinPhoneValue(Me.Placeholder)))
                {
                    this.Placeholder = OnPlatformString.GetWinPhoneValue(Me.Placeholder);
                }
            }
                );

            this.Completed += EntryCell_Completed;
        }