Beispiel #1
0
        private void AddScheduleViewPickerItems()
        {
            schedule_view          = new Label();
            schedule_view.Text     = "Select the schedule view";
            schedule_view.FontSize = 15;

            schedule_view_picker = new PickerExt();
            schedule_view_picker.WidthRequest = 500;
            schedule_view_picker.Items.Add("Day View");
            schedule_view_picker.Items.Add("Month View");
            schedule_view_picker.SelectedIndex = 0;
        }
        //Defining Schedule view settings
        private void AddScheduleViewPickerItems()
        {
            schedule_view          = new Label();
            schedule_view.Text     = "Select the schedule view";
            schedule_view.FontSize = 15;
            if (Device.OS == TargetPlatform.Android)
            {
                schedule_view.TextColor = Color.Black;
            }
            //else if (Device.Idiom == TargetIdiom.Phone && Device.OS == TargetPlatform.Windows)
            //    schedule_view.TextColor = Color.White;
            else
            {
                schedule_view.TextColor = Color.Black;
            }

            schedule_view_picker = new PickerExt();
            schedule_view_picker.WidthRequest = 500;
            schedule_view_picker.Items.Add("Day View");
            schedule_view_picker.Items.Add("Week View");
            schedule_view_picker.Items.Add("Work Week View");
            schedule_view_picker.Items.Add("Month View");
            schedule_view_picker.SelectedIndex = 0;
        }
        private void DrawOptionsPage()
        {
            toggleButton                = new Xamarin.Forms.Slider();
            toggleButton.Value          = 4;
            toggleButton2               = new Xamarin.Forms.Slider();
            toggleButton2.Value         = 2;
            toggleButton.Maximum        = 20;
            toggleButton2.Maximum       = 20;
            toggleButton2.ValueChanged += (object sender, ValueChangedEventArgs e) =>
            {
                //groupGap = e.NewValue;
            };
            toggleButton.ValueChanged += (object sender, ValueChangedEventArgs e) => {
                groupPadding = e.NewValue;
                (tree.Levels [0] as TreeMapFlatLevel).GroupPadding = groupPadding;
                tree.Refresh();
            };
            picker1 = new PickerExt();
            picker2 = new PickerExt();
            picker1.Items.Add("Squarified");
            picker1.Items.Add("Slice And Dice Horizontal");
            picker1.Items.Add("Slice And Dice Vertical");
            picker1.Items.Add("Slice And Dice Auto");
            picker1.HeightRequest         = 40;
            picker1.SelectedIndex         = 0;
            picker1.SelectedIndexChanged += picker1_SelectedIndexChanged;


            picker2.Items.Add("RangeColorMapping");
            picker2.Items.Add("DesaturationColorMapping");
            picker2.Items.Add("UniColorMapping");
            picker2.Items.Add("PaletteColorMapping");
            picker2.HeightRequest = 40;
            picker2.SelectedIndex = 0;

            picker2.SelectedIndexChanged += picker2_SelectedIndexChanged;
            picker1.BackgroundColor       = Color.White;
            picker2.BackgroundColor       = Color.White;



            label6 = new Label()
            {
                Text          = " " + "Settings",
                FontSize      = 60,
                HeightRequest = 60,
                YAlign        = TextAlignment.End,
                TextColor     = Color.White
            };
            label3 = new Label()
            {
                Text          = "Layout Type",
                HeightRequest = 20,
                YAlign        = TextAlignment.End,
                TextColor     = Color.Black
            };
            label4 = new Label()
            {
                Text          = "Color Mapping",
                HeightRequest = 20,
                YAlign        = TextAlignment.End,
                TextColor     = Color.Black
            };
            label5 = new Label()
            {
                Text          = "Group Padding",
                HeightRequest = 30,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.Black,
            };
            label9 = new Label()
            {
                Text          = "Group Gap",
                HeightRequest = 20,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.Black
            };


            if (Device.OS == TargetPlatform.Android)
            {
                picker1.BackgroundColor = Color.FromRgb(239, 239, 239);
                picker2.BackgroundColor = Color.FromRgb(239, 239, 239);
                label3.FontSize         = 20;
                label4.FontSize         = 20;
                label5.FontSize         = 20;
            }
            //label10.WidthRequest = tree.Width;
            //label11.WidthRequest = tree.Width;
            label5.WidthRequest = label9.Width;
            if (Device.OS == TargetPlatform.WinPhone)
            {
                label5.WidthRequest = 150;
                label9.WidthRequest = 150;

                picker1.HeightRequest = 60;
                picker2.HeightRequest = 60;

                label3.TextColor     = Color.White;
                label4.TextColor     = Color.White;
                label5.TextColor     = Color.White;
                this.BackgroundColor = Color.Black;


                FileImageSource images = new FileImageSource();
                images.File          = "options.png";
                baritem.Icon         = images;
                label3.Text          = "  " + "Layout Type";
                label3.HeightRequest = 22;
                label4.Text          = "  " + "Color Mapping";
                label4.HeightRequest = 22;
                label5.Text          = "  " + "Group Padding";
                label5.HeightRequest = 22;

                label9.TextColor = Color.White;
            }
            if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
            {
                picker1.BackgroundColor = Color.Gray;
                picker2.BackgroundColor = Color.Gray;
            }
        }
		public BusyIndicator ()
		{
			//InitializeComponent ();
			Label label;
			sfbusyindicator = new SfBusyIndicator();
			sfbusyindicator.ViewBoxWidth = 150;
			sfbusyindicator.ViewBoxHeight = 150;
			sfbusyindicator.BackgroundColor = Color.White;
			sfbusyindicator.VerticalOptions = LayoutOptions.FillAndExpand;
			picker = new PickerExt ();
			picker.BackgroundColor = Color.White;
		    if (Device.OS == TargetPlatform.WinPhone)
		        picker.BackgroundColor = Color.Gray;
			picker.Items.Add ("Ball");
			picker.Items.Add ("Battery");
			picker.Items.Add ("DoubleCircle");
			picker.Items.Add ("ECG");
			picker.Items.Add ("Globe");
			picker.Items.Add ("HorizontalPulsingBox");
			picker.Items.Add ("Print");
			picker.Items.Add ("Rectangle");
			picker.Items.Add ("SingleCircle");
			picker.Items.Add ("SlicedCircle");
			picker.HeightRequest = 40;
			picker.SelectedIndex = 0;
			picker.SelectedIndexChanged += picker_SelectedIndexChanged;
			if (Device.OS == TargetPlatform.iOS)
			{

				picker.BackgroundColor = Color.White;
				label = new Label () {
					Text = "\nAnimation Type",
					HeightRequest = 20,
					TextColor = Color.Black
				};
				label.FontAttributes = FontAttributes.Bold;
				label.FontSize = 25;
			}
			else if(Device.OS == TargetPlatform.WinPhone)
			{
				label = new Label() { Text = "Animation Type", HeightRequest = 35, TextColor = Color.Black };
				picker.HeightRequest = 60;
				label.FontAttributes = FontAttributes.Bold;
				label.FontSize = 25;
				sfbusyindicator.Title = " ";
			}
            
                
			else
			{
				label = new Label() { Text = "Animation Type", HeightRequest = 35,  TextColor = Color.Black };
				label.FontAttributes = FontAttributes.Bold;
				label.FontSize = 25;
			}
            if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
            {
               
                    picker.BackgroundColor = Color.Gray;
                
            }
			var mainStack = new StackLayout
			{
				Spacing = Device.OnPlatform(iOS: 10, Android: 10, WinPhone: 30),
				Padding = Device.OnPlatform(iOS: 10, Android : 10, WinPhone : 20),
				Children = {label,picker,sfbusyindicator }
			};
			this.ContentView = mainStack;
			this.BackgroundColor = Color.FromRgb(236,235,242);
		}
        public void getPropertiesWindow()
        {
            view = new StackLayout();
            view.BackgroundColor = Color.FromRgb(250, 250, 250);
            view.HeightRequest   = Property_Windows.HeightRequest;
            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);
            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 20;

            closeButton = new Button();
            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked += Close_Button;

            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            emptyLayout.Padding         = new Thickness(40, 10, 40, 40);

            StackLayout selectionLayout = new StackLayout();

            selectionLayout.Orientation       = StackOrientation.Horizontal;
            selectionLayout.HorizontalOptions = LayoutOptions.Center;
            selectionLayout.Padding           = new Thickness(10, 0, 0, 10);
            selectionLayout.HeightRequest     = 70;
            selectionModeLabel                   = new Label();
            selectionModeLabel.Text              = "Selection Mode";
            selectionModeLabel.WidthRequest      = 150;
            selectionModeLabel.VerticalOptions   = LayoutOptions.Center;
            selectionModeLabel.HorizontalOptions = LayoutOptions.Start;
            selectionModeLabel.FontFamily        = "Helvetica";
            selectionModeLabel.FontSize          = 16;

            selectionModePicker = new PickerExt();
            selectionModePicker.Items.Add("SingleSelection");
            selectionModePicker.Items.Add("MultiSelection");
            selectionModePicker.VerticalOptions       = LayoutOptions.Center;
            selectionModePicker.HorizontalOptions     = LayoutOptions.End;
            selectionModePicker.SelectedIndex         = selection;
            selectionModePicker.WidthRequest          = 180;
            selectionModePicker.SelectedIndexChanged += selectionModePicker_Changed;
            selectionLayout.Children.Add(selectionModeLabel);
            selectionLayout.Children.Add(selectionModePicker);

            StackLayout minLayout = new StackLayout();

            minLayout.Orientation       = StackOrientation.Horizontal;
            minLayout.HorizontalOptions = LayoutOptions.Center;
            minLayout.Padding           = new Thickness(10, 10, 0, 10);
            minLayout.HeightRequest     = 70;
            Label mindate = new Label();

            mindate.Text              = "Min Date";
            mindate.WidthRequest      = 150;
            mindate.VerticalOptions   = LayoutOptions.Center;
            mindate.HorizontalOptions = LayoutOptions.Start;
            mindate.FontFamily        = "Helvetica";
            mindate.FontSize          = 16;

            minDatePicker = new DatePicker();
            minDatePicker.WidthRequest      = 180;
            minDatePicker.VerticalOptions   = LayoutOptions.Center;
            minDatePicker.HorizontalOptions = LayoutOptions.End;
            minDatePicker.Date          = min;
            minDatePicker.Format        = "D";
            minDatePicker.DateSelected += minDatePicker_DateSelected;
            minLayout.Children.Add(mindate);
            minLayout.Children.Add(minDatePicker);


            StackLayout maxLayout = new StackLayout();

            maxLayout.Orientation       = StackOrientation.Horizontal;
            maxLayout.HorizontalOptions = LayoutOptions.Center;
            maxLayout.Padding           = new Thickness(10, 10, 0, 10);
            maxLayout.HeightRequest     = 70;

            Label maxDate = new Label();

            maxDate.Text              = "Max Date";
            maxDate.WidthRequest      = 150;
            maxDate.HorizontalOptions = LayoutOptions.Start;
            maxDate.VerticalOptions   = LayoutOptions.Center;
            maxDate.FontFamily        = "Helvetica";
            maxDate.FontSize          = 16;

            maxDatePicker      = new DatePicker();
            maxDatePicker.Date = max;
            maxDatePicker.HorizontalOptions = LayoutOptions.End;
            maxDatePicker.VerticalOptions   = LayoutOptions.Center;
            maxDatePicker.Format            = "D";
            maxDatePicker.WidthRequest      = 180;
            maxDatePicker.DateSelected     += maxDate_DateSelected;


            maxLayout.Children.Add(maxDate);
            maxLayout.Children.Add(maxDatePicker);


            emptyLayout.Children.Add(selectionLayout);
            emptyLayout.Children.Add(minLayout);
            emptyLayout.Children.Add(maxLayout);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);
            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);
        }
Beispiel #6
0
        public void getPropertiesWindow()
        {
            view = new StackLayout();
            view.HeightRequest   = Property_Windows.HeightRequest;
            view.BackgroundColor = Color.FromRgb(250, 250, 250);

            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);

            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);

            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 18;

            closeButton = new Button();

            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked          += Close_Button;
            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;

            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);

            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            emptyLayout.Padding         = new Thickness(40, 20, 40, 40);

            StackLayout offsetLayout = new StackLayout();

            offsetLayout.Orientation   = StackOrientation.Horizontal;
            offsetLayout.Padding       = new Thickness(60, 0, 60, 0);
            offsetLayout.HeightRequest = 60;

            offsetLabel                   = new Label();
            offsetLabel.Text              = "Offset";
            offsetLabel.WidthRequest      = 300;
            offsetLabel.VerticalOptions   = LayoutOptions.Center;
            offsetLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            offsetLabel.FontFamily        = "Helvetica";
            offsetLabel.FontSize          = 16;

            offsetText = new Entry();
            offsetText.WidthRequest      = 150;
            offsetText.Keyboard          = Keyboard.Numeric;
            offsetText.VerticalOptions   = LayoutOptions.Center;
            offsetText.HorizontalOptions = LayoutOptions.StartAndExpand;
            offsetText.FontFamily        = "Helvetica";
            offsetText.FontSize          = 16;
            offsetText.Text         = offset.ToString();
            offsetText.TextChanged += offsetValue_Changed;

            offsetLayout.Children.Add(offsetLabel);
            offsetLayout.Children.Add(offsetText);

            StackLayout scaleLayout = new StackLayout();

            scaleLayout.Orientation   = StackOrientation.Horizontal;
            scaleLayout.Padding       = new Thickness(60, 0, 60, 0);
            scaleLayout.HeightRequest = 60;

            scaleLabel                   = new Label();
            scaleLabel.Text              = "Scale";
            scaleLabel.WidthRequest      = 300;
            scaleLabel.VerticalOptions   = LayoutOptions.Center;
            scaleLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            scaleLabel.FontFamily        = "Helvetica";
            scaleLabel.FontSize          = 16;

            scale = new Entry();
            scale.WidthRequest      = 150;
            scale.Keyboard          = Keyboard.Numeric;
            scale.VerticalOptions   = LayoutOptions.Center;
            scale.HorizontalOptions = LayoutOptions.StartAndExpand;
            scale.FontFamily        = "Helvetica";
            scale.FontSize          = 16;
            scale.Text         = scaleValue.ToString();
            scale.TextChanged += ScaleValue_Changed;

            scaleLayout.Children.Add(scaleLabel);
            scaleLayout.Children.Add(scale);

            StackLayout rotateLayout = new StackLayout();

            rotateLayout.Orientation   = StackOrientation.Horizontal;
            rotateLayout.Padding       = new Thickness(60, 0, 60, 0);
            rotateLayout.HeightRequest = 60;

            rotateAngleLabel                   = new Label();
            rotateAngleLabel.Text              = "Rotate Angle";
            rotateAngleLabel.WidthRequest      = 300;
            rotateAngleLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            rotateAngleLabel.VerticalOptions   = LayoutOptions.Center;
            rotateAngleLabel.FontFamily        = "Helvetica";
            rotateAngleLabel.FontSize          = 16;

            rotate = new Entry();
            rotate.WidthRequest      = 150;
            rotate.Keyboard          = Keyboard.Numeric;
            rotate.VerticalOptions   = LayoutOptions.Center;
            rotate.HorizontalOptions = LayoutOptions.StartAndExpand;
            rotate.FontFamily        = "Helvetica";
            rotate.FontSize          = 16;
            rotate.Text         = rotateValue.ToString();
            rotate.TextChanged += rotateValue_Changed;

            rotateLayout.Children.Add(rotateAngleLabel);
            rotateLayout.Children.Add(rotate);

            var viewModeLayout = new StackLayout();

            viewModeLayout.Orientation   = StackOrientation.Horizontal;
            viewModeLayout.Padding       = new Thickness(60, 0, 60, 0);
            viewModeLayout.HeightRequest = 60;

            Label viewModeLabel = new Label();

            viewModeLabel.Text              = "View Mode";
            viewModeLabel.WidthRequest      = 300;
            viewModeLabel.HorizontalOptions = LayoutOptions.Start;
            viewModeLabel.VerticalOptions   = LayoutOptions.Center;
            viewModeLabel.FontFamily        = "Helvetica";
            viewModeLabel.FontSize          = 16;

            modePicker = new PickerExt();
            modePicker.WidthRequest = 150;
            modePicker.Items.Add("Default");
            modePicker.Items.Add("Linear");
            modePicker.SelectedIndex         = 0;
            modePicker.SelectedIndexChanged += viewmodePicker_SelectedIndexChanged;

            viewModeLayout.Children.Add(viewModeLabel);
            viewModeLayout.Children.Add(modePicker);

            if (Device.OS == TargetPlatform.iOS)
            {
                emptyLayout.Padding              = new Thickness(30, 10, 40, 0);
                viewModeLabel.WidthRequest       = 250;
                viewModeLayout.Orientation       = StackOrientation.Horizontal;
                viewModeLayout.Padding           = new Thickness(60, 10, 0, 20);
                modePicker.WidthRequest          = 250;
                modePicker.HorizontalOptions     = LayoutOptions.StartAndExpand;
                modePicker.VerticalOptions       = LayoutOptions.Center;
                viewModeLayout.HorizontalOptions = LayoutOptions.Center;
                viewModeLayout.VerticalOptions   = LayoutOptions.Center;
                emptyLayout.BackgroundColor      = Color.FromRgb(250, 250, 250);
            }
            emptyLayout.Children.Add(offsetLayout);
            emptyLayout.Children.Add(scaleLayout);
            emptyLayout.Children.Add(rotateLayout);
            emptyLayout.Children.Add(viewModeLayout);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);
            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);
        }
		public AutoComplete ()
		{
			label = new Label ();
			label.Text = "Type a country name to display the suggested list in the dropdown";
			label1 = new Label() { Text = "SuggestionMode", HeightRequest = 50, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label2 = new Label() { Text = "AutoCompleteMode", HeightRequest = 50, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label3 = new Label() { Text = "Max DropDown Height", HeightRequest = 40, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label4 = new Label() { Text = "Min Prefix Character", HeightRequest = 40, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label5 = new Label() { Text = "Popup Delay", HeightRequest = 40, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label1.FontAttributes = FontAttributes.None;
			label1.FontSize = 20;
			label2.FontAttributes = FontAttributes.None;
			label2.FontSize = 20;
			label3.FontAttributes = FontAttributes.None;
			label3.FontSize = 20;
			label4.FontAttributes = FontAttributes.None;
			label4.FontSize = 20;
			label5.FontAttributes = FontAttributes.None;
			label5.FontSize = 20;
			text1 = new Entry ();
			text2 = new Entry ();
			text3 = new Entry ();
			label1.YAlign = TextAlignment.End;
			label2.YAlign = TextAlignment.End;
			label3.YAlign = TextAlignment.Center;
			label4.YAlign = TextAlignment.Center;
			label5.YAlign = TextAlignment.Center;
			text1.WidthRequest = 80;
			text2.WidthRequest = 80;
			text3.WidthRequest = 80;
			text1.HeightRequest = 40;
			text2.HeightRequest = 40;
			text3.HeightRequest = 40;
			picker1 = new PickerExt ();
			picker2 = new PickerExt ();
			label3.WidthRequest = 300;
			label4.WidthRequest = 300;
			label5.WidthRequest = 300;
			picker1.Items.Add ("StartsWith");
			picker1.Items.Add ("StartsWithCaseSensitive");
			picker1.Items.Add ("Contains");
			picker1.Items.Add ("ContainsWithCaseSensitive");
			picker1.Items.Add ("EndsWith");
			picker1.Items.Add ("EndsWithCaseSensitive");
			picker1.Items.Add ("Equals");
			picker1.Items.Add ("EqualsWithCaseSensitive");

			picker2.Items.Add ("Append");
			picker2.Items.Add ("Suggest");
			picker2.Items.Add ("SuggestAppend");
			picker1.SelectedIndex = 0;
			picker2.SelectedIndex = 1;
			text1.Text = "300";
			text2.Text = "2";
			text3.Text = "100";
			text1.TextChanged+= (object sender, TextChangedEventArgs e) => 
			{
				if(e.NewTextValue.Length >0){
					autocomplete1.MaximumDropDownHeight = int.Parse(e.NewTextValue);
					autocomplete2.MaximumDropDownHeight = int.Parse(e.NewTextValue);
				}
				else{
					autocomplete1.MaximumDropDownHeight = 100;
					autocomplete2.MaximumDropDownHeight = 100;
				}
			};
			text2.TextChanged+= (object sender, TextChangedEventArgs e) => 
			{
				if(e.NewTextValue.Length > 0){
                    autocomplete1.MinimumPrefixCharacters = int.Parse(e.NewTextValue);
                    autocomplete2.MinimumPrefixCharacters = int.Parse(e.NewTextValue);
				}
				else{
					autocomplete1.MinimumPrefixCharacters = 1;
					autocomplete2.MinimumPrefixCharacters = 1;
				}
			};
			text3.TextChanged+= (object sender, TextChangedEventArgs e) => 
			{
				if(e.NewTextValue.Length > 0){
					autocomplete1.PopupDelay = int.Parse(e.NewTextValue);
					autocomplete2.PopupDelay = int.Parse(e.NewTextValue);
				}
				else{
					autocomplete1.PopupDelay = 100;
					autocomplete2.PopupDelay = 100;
				}
			};
			picker1.SelectedIndexChanged += (object sender, EventArgs e) => {
				switch (picker1.SelectedIndex) {
				case 0:
					{
						autocomplete1.SuggestionMode = SuggestionMode.StartsWith;
						autocomplete2.SuggestionMode = SuggestionMode.StartsWith;
					}
					break;
				case 1:
					{
						autocomplete1.SuggestionMode = SuggestionMode.StartsWithCaseSensitive;
						autocomplete2.SuggestionMode = SuggestionMode.StartsWithCaseSensitive;
					}
					break;
				case 2:
					{
						autocomplete1.SuggestionMode = SuggestionMode.Contains;
						autocomplete2.SuggestionMode = SuggestionMode.Contains;
					}
					break;
				case 3:
					{
						autocomplete1.SuggestionMode = SuggestionMode.ContainsWithCaseSensitive;
						autocomplete2.SuggestionMode = SuggestionMode.ContainsWithCaseSensitive;
					}
					break;
				case 4:
					{
						autocomplete1.SuggestionMode = SuggestionMode.EndsWith;
						autocomplete2.SuggestionMode = SuggestionMode.EndsWith;
					}
					break;
				case 5:
					{
						autocomplete1.SuggestionMode = SuggestionMode.EndsWithCaseSensitive;
						autocomplete2.SuggestionMode = SuggestionMode.EndsWithCaseSensitive;
					}
					break;
				case 6:
					{
						autocomplete1.SuggestionMode = SuggestionMode.Equals;
						autocomplete2.SuggestionMode = SuggestionMode.Equals;
					}
					break;
				case 7:
					{
						autocomplete1.SuggestionMode = SuggestionMode.EqualsWithCaseSensitive;
						autocomplete2.SuggestionMode = SuggestionMode.EqualsWithCaseSensitive;
					}
					break;
				}
			};
			picker2.SelectedIndexChanged += (object sender, EventArgs e) => {
				switch (picker2.SelectedIndex) {
				case 0:
					{
						autocomplete1.AutoCompleteMode = AutoCompleteMode.Append;
						autocomplete2.AutoCompleteMode = AutoCompleteMode.Append;
					}
					break;
				case 1:
					{
						autocomplete1.AutoCompleteMode = AutoCompleteMode.Suggest;
						autocomplete2.AutoCompleteMode = AutoCompleteMode.Suggest;
					}
					break;
				case 2:
					{
						autocomplete1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
						autocomplete2.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
					}
					break;
				}
			};
			s1 = string.Empty;
			s2 = string.Empty;
			pp = new PickerExt ();
			title.Add ("Software");
			title.Add ("Banking");
			title.Add ("Media");
			title.Add ("Medical");

			exp.Add ("1");
			exp.Add ("2");
			label5s = new Label ();
			label1s = new Label() { Text = "Job Search", HeightRequest = 40,VerticalOptions=LayoutOptions.Center, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label2s = new Label() { Text = "Country", HeightRequest = 30, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label3s = new Label() { Text = "Job Field", HeightRequest = 30, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label4s = new Label() { Text = "Experience", HeightRequest = 30, HorizontalOptions=LayoutOptions.Start, TextColor = Color.Gray };
			label1s.FontAttributes = FontAttributes.Bold;
			label1s.FontSize = 24;
			label2s.FontAttributes = FontAttributes.None;
			label2s.FontSize = 18;
			label3s.FontAttributes = FontAttributes.None;
			label3s.FontSize = 18;
			label4s.FontAttributes = FontAttributes.None;
			label4s.FontSize = 18;
			label5s.HeightRequest = 10;
			label1s.TextColor = Color.Black;
			label2s.TextColor = Color.Black;
			label3s.TextColor = Color.Black;
			label4s.TextColor = Color.Black;
			label5s.TextColor = Color.Black;
			buttons = new Button ();
			buttons.Text = "Search";
			buttons.Clicked += (object sender, EventArgs e) => {
				if (s1 != "" && s2 != "") {
					Random r = new Random ();
					DisplayAlert ("Results", r.Next (9, 50) + " Jobs found", "OK");
				} else
					DisplayAlert ("Results", "0 Jobs found", "OK");
			};

			autocomplete1 = new SfAutoComplete ();
            autocomplete1.SuggestionMode = SuggestionMode.StartsWith;
            autocomplete1.AutoCompleteMode = AutoCompleteMode.Suggest;
            autocomplete1.MaximumDropDownHeight = 300;
            autocomplete1.AutoCompleteSource = new Countrylist().Country;
			autocomplete1.HeightRequest = 40;
            autocomplete1.Watermark = "Enter a country name";
            autocomplete1.ValueChanged += (object sender, Syncfusion.SfAutoComplete.XForms.ValueChangedEventArgs e) =>
            {
                s1 = e.Value;
            };
			autocomplete2 = new SfAutoComplete ();
			autocomplete2.SuggestionMode = SuggestionMode.StartsWith;
			autocomplete2.AutoCompleteMode = AutoCompleteMode.Suggest;
			autocomplete2.MaximumDropDownHeight = 300;
            autocomplete2.AutoCompleteSource = title;
			autocomplete2.HeightRequest = 40;
            autocomplete2.Watermark = "Enter 'B' , 'S' , 'M' to start";
            autocomplete2.ValueChanged += (object sender, Syncfusion.SfAutoComplete.XForms.ValueChangedEventArgs e) =>
            {
                s2 = e.Value;
            };
			pp.Items.Add ("1");
			pp.Items.Add ("2");
			pp.SelectedIndex = 0;
			pp.BackgroundColor = Color.White;
			

			
			//this.BackgroundColor = Color.FromRgb(236, 235, 242);
			if (Device.OS == TargetPlatform.WinPhone)
			{
                autocomplete1.HeightRequest = 80;
                autocomplete2.HeightRequest = 80;
				this.BackgroundColor = Color.Black;
				label1s.TextColor = Color.White;
				label2s.TextColor = Color.White;
				label3s.TextColor = Color.White;
				label4s.TextColor = Color.White;
				label5s.TextColor = Color.White;
                autocomplete2.BackgroundColor = Color.White;
                autocomplete1.BackgroundColor = Color.White;
				pp.BackgroundColor = Color.Black;
                text2.WidthRequest = 120;
                text3.WidthRequest = 120;
                text2.HeightRequest = 80;
                text3.HeightRequest = 80;
			}
            if ( Device.OS == TargetPlatform.Windows)
            {
                
                this.BackgroundColor = Color.Black;
                label1s.TextColor = Color.Black;
                label2s.TextColor = Color.Black;
                label3s.TextColor = Color.Black;
                label4s.TextColor = Color.Black;
                label5s.TextColor = Color.Black;
                autocomplete2.BackgroundColor = Color.White;
                autocomplete1.BackgroundColor = Color.White;
                //pp.BackgroundColor = Color.Gray;
                text2.WidthRequest = 120;
                text3.WidthRequest = 120;
                if (Device.Idiom != TargetIdiom.Tablet)
                {
                    this.BackgroundColor = Color.Black;
                    label1s.TextColor = Color.White;
                    label2s.TextColor = Color.White;
                    label3s.TextColor = Color.White;
                    label4s.TextColor = Color.White;
                    label5s.TextColor = Color.White;
                    pp.BackgroundColor = Color.Black;
                }

            }

           
            this.ContentView = GetAutoComplete();
			PropertyView = GetOptionPage ();
		}
        public void getPropertiesWindow()
        {
            view = new StackLayout();

            view.HeightRequest   = Property_Windows.HeightRequest;
            view.BackgroundColor = Color.FromRgb(250, 250, 250);
            if (Device.OS == TargetPlatform.iOS)
            {
                Property_Windows.HeightRequest = 250;
            }

            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);

            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);
            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 20;
            closeButton = new Button();
            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked += Close_Button;

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);

            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            if (Device.OS == TargetPlatform.iOS)
            {
                emptyLayout.Padding = new Thickness(60, 20, 40, 40);
            }
            else
            {
                emptyLayout.Padding = new Thickness(30, 20, 40, 40);
            }

            StackLayout cultureLayout = new StackLayout();

            cultureLayout.Orientation = StackOrientation.Horizontal;
            cultureLayout.Padding     = new Thickness(100, 20, 0, 20);

            Label cultureLabel = new Label();

            cultureLabel.Text              = "Culture";
            cultureLabel.WidthRequest      = 150;
            cultureLabel.VerticalOptions   = LayoutOptions.Center;
            cultureLabel.HorizontalOptions = LayoutOptions.End;
            cultureLabel.FontFamily        = "Helvetica";
            cultureLabel.FontSize          = 16;

            localePicker = new PickerExt();
            localePicker.VerticalOptions   = LayoutOptions.Center;
            localePicker.HorizontalOptions = LayoutOptions.Start;
            localePicker.Items.Add("United States");
            localePicker.Items.Add("United Kingdom");
            localePicker.Items.Add("Japan");
            localePicker.Items.Add("France");
            localePicker.Items.Add("Italy");
            localePicker.SelectedIndex = precision;

            localePicker.SelectedIndexChanged += localePicker_Changed;
            cultureLayout.Children.Add(cultureLabel);
            cultureLayout.Children.Add(localePicker);

            StackLayout allowNullLayout = new StackLayout();

            allowNullLayout.Orientation = StackOrientation.Horizontal;
            allowNullLayout.Padding     = new Thickness(100, 20, 0, 20);

            allowNullLabel                   = new Label();
            allowNullLabel.Text              = "Allow Null";
            allowNullLabel.WidthRequest      = 150;
            allowNullLabel.VerticalOptions   = LayoutOptions.Center;
            allowNullLabel.HorizontalOptions = LayoutOptions.End;
            allowNullLabel.FontFamily        = "Helvetica";
            allowNullLabel.FontSize          = 16;

            allowNullToggle                   = new Switch();
            allowNullToggle.Toggled          += toggleStateChanged;
            allowNullToggle.IsToggled         = tooltip;
            allowNullToggle.HorizontalOptions = LayoutOptions.Start;
            allowNullToggle.VerticalOptions   = LayoutOptions.Center;
            allowNullLayout.Children.Add(allowNullLabel);
            allowNullLayout.Children.Add(allowNullToggle);

            emptyLayout.Children.Add(cultureLayout);
            emptyLayout.Children.Add(allowNullLayout);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);

            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);
        }
		public RangeSlider ()
		{
			//InitializeComponent ();
			
			sfRangeSlider1 = new SfRangeSlider();
			sfRangeSlider2 = new SfRangeSlider();

			sfRangeSlider1.HeightRequest = 90;
			sfRangeSlider1.WidthRequest = 200;
			sfRangeSlider1.Minimum = 0;
			sfRangeSlider1.Maximum = 12;
			sfRangeSlider1.RangeStart = 0;
			sfRangeSlider1.RangeEnd = 12;
			sfRangeSlider1.TickFrequency = 2;
			sfRangeSlider1.SnapsTo = SnapsTo.None;
			sfRangeSlider1.Orientation = Syncfusion.SfRangeSlider.XForms.Orientation.Horizontal;
			sfRangeSlider1.TickPlacement = TickPlacement.BottomRight;


			sfRangeSlider2.HeightRequest = 90;
			sfRangeSlider2.WidthRequest = 200;
			sfRangeSlider2.Minimum = 0;
			sfRangeSlider2.Maximum = 12;
			sfRangeSlider2.RangeStart = 0;
			sfRangeSlider2.RangeEnd = 12;
			sfRangeSlider2.TickFrequency = 2;
			sfRangeSlider2.SnapsTo = SnapsTo.None;
			sfRangeSlider2.Orientation = Syncfusion.SfRangeSlider.XForms.Orientation.Horizontal;
			sfRangeSlider2.TickPlacement = TickPlacement.BottomRight;
			
			Title = "Getting Started";
			toggleButton = new Switch();
			toggleButton2 = new Switch();
			picker1 = new PickerExt();
			picker2 = new PickerExt();
			sfRangeSlider1.RangeChanging += (object sender, RangeEventArgs e) => {
				if (Math.Round (e.Start) < 1) {
					if (Math.Round (e.End) == 12)
						label10.Text = "12 AM - " + Math.Round (e.End) + " PM";
					else
						label10.Text = "12 AM - " + Math.Round (e.End) + " AM";
				} else {
					if (Math.Round (e.End) == 12)
						label10.Text = Math.Round (e.Start) + " AM - " + Math.Round (e.End) + " PM";
					else
						label10.Text = Math.Round (e.Start) + " AM - " + Math.Round (e.End) + " AM";
				}
				if (Math.Round (e.Start) == Math.Round (e.End)) {
					if (Math.Round (e.Start) < 1) 
						label10.Text = "12 AM";
					else if(Math.Round (e.Start) == 12)
						label10.Text = "12 PM";
					else
						label10.Text = Math.Round (e.Start) + " AM";
				}
			};
			sfRangeSlider2.RangeChanging+= (object sender, RangeEventArgs e) => 
			{
				if (Math.Round (e.Start) < 1) {
					if (Math.Round (e.End) == 12)
						label11.Text = "12 AM - " + Math.Round (e.End) + " PM";
					else
						label11.Text = "12 AM - " + Math.Round (e.End) + " AM";
				} else {
					if (Math.Round (e.End) == 12)
						label11.Text = Math.Round (e.Start) + " AM - " + Math.Round (e.End) + " PM";
					else
						label11.Text = Math.Round (e.Start) + " AM - " + Math.Round (e.End) + " AM";
				}
				if (Math.Round (e.Start) == Math.Round (e.End)) {
					if (Math.Round (e.Start) < 1) 
						label11.Text = "12 AM";
					else if(Math.Round (e.Start) == 12)
						label11.Text = "12 PM";
					else
						label11.Text = Math.Round (e.Start) + " AM";
				}
			};
			toggleButton.Toggled += toggleStateChanged;
			toggleButton2.Toggled += toggleStateChanged1;
			toggleButton.IsToggled = true;
			picker1.Items.Add("TopLeft");
			picker1.Items.Add("BottomRight");
			picker1.Items.Add("Inline");
			picker1.Items.Add("Outside");
			picker1.Items.Add("None");
			picker1.HeightRequest = 40;
			picker1.SelectedIndex = 1;
			picker1.SelectedIndexChanged += picker1_SelectedIndexChanged;
			picker2.Items.Add("TopLeft");
			picker2.Items.Add("BottomRight");
			picker2.HeightRequest = 40;
			picker2.SelectedIndex = 1;
			picker2.SelectedIndexChanged += picker2_SelectedIndexChanged;
			picker1.BackgroundColor = Color.White;
			picker2.BackgroundColor = Color.White;
			label6 = new Label()
			{
				Text = " " + "Settings",
				FontSize = 60,
				HeightRequest = 60,
				YAlign = TextAlignment.End,
				TextColor = Color.White
			};
			label3 = new Label()
			{
				Text = "Tick Placement",
				HeightRequest = 20,
				YAlign = TextAlignment.End,
				TextColor = Color.Black
			};
			label4 = new Label()
			{
				Text = "Label Placement",
				HeightRequest = 20,
				YAlign = TextAlignment.End,
				TextColor = Color.Black
			};
			label5 = new Label()
			{
				Text = "Label",
				HeightRequest = 20,
				YAlign = TextAlignment.Center,
				TextColor = Color.Black,
			};
			label9 = new Label()
			{
				Text = "SnapsToTick",
				HeightRequest = 20,
				YAlign = TextAlignment.Center,
				TextColor = Color.Black
			};
		    if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
		    {
		        label9.TextColor = Color.White;
		    }
		    label10 = new Label()
			{
				FontSize = 12,
				Text = "12 AM - 12 PM",
				HeightRequest = 20,
				YAlign = TextAlignment.Center,
				TextColor = Color.FromHex("#939394"),
				XAlign = TextAlignment.Start
			};
			label11 = new Label()
			{
				FontSize = 12,
				Text = "12 AM - 12 PM",
				HeightRequest = 20,
				YAlign = TextAlignment.Center,
				TextColor = Color.FromHex("#939394"),
				XAlign = TextAlignment.Start
			};
			if (Device.OS == TargetPlatform.Android) {
				time = new Label()
				{
					FontSize = 12,
					Text = "   Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				time1 = new Label()
				{
					FontSize = 12,
					Text = "   Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				label = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "  Departure",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
				label1 = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "  Arrival",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
			} else if (Device.OS == TargetPlatform.iOS) {
				time = new Label()
				{
					FontSize = 12,
					Text = "   Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				time1 = new Label()
				{
					FontSize = 12,
					Text = "   Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				label = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "  Departure",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
				label1 = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "  Arrival",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
			} else {
				time1 = new Label()
				{
					FontSize = 12,
					Text = "Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				time = new Label()
				{
					FontSize = 12,
					Text = "Time: ",
					HeightRequest = 20,
					YAlign = TextAlignment.Center,
					TextColor = Color.FromHex("#939394"),
					XAlign = TextAlignment.Start
				};
				label = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "Departure",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
				label1 = new Label()
				{
					XAlign = TextAlignment.Start,
					Text = "Arrival",
					HeightRequest = 20,
					YAlign = TextAlignment.End,
					TextColor = Color.Black
				};
                if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
                {
                    label.TextColor = Color.White;
                    label1.TextColor = Color.White;
                }
			}

			if (Device.OS == TargetPlatform.Android)
			{
				picker1.BackgroundColor = Color.FromRgb(239, 239, 239);
				picker2.BackgroundColor = Color.FromRgb(239, 239, 239);
				label3.FontSize = 20;
				label4.FontSize = 20;
				label5.FontSize = 20;
				label9.FontSize = 20;
			}
			label10.WidthRequest = sfRangeSlider1.Width;
			label11.WidthRequest = sfRangeSlider1.Width;
			label5.WidthRequest = label9.Width;
			ContentView = GetRangeSlider();
			PropertyView = GetOptionPage ();
		}
		public NumericTextBox ()
		{
            double height = Bounds.Height;
            double width = App.ScreenWidth;
		    if (Device.Idiom == TargetIdiom.Tablet)
		    {
		        width /= 2;
		    }
            
			label1 = new Label() { Text = "Simple Interest Calculator", HeightRequest = 40, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black };
			label2 = new Label() { Text = "The formula for finding simple interest is :", HeightRequest = 45, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black };
			label3 = new Label() { Text = "Interest = Principal * Rate * Time", HeightRequest = 40, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black };
			label4 = new Label() { Text = "Principal", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black };
			label5 = new Label() { Text = "Interest Rate", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black };
			label6 = new Label() { Text = "Term", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black };
			label7 = new Label() { Text = "Interest", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black };
            label11 = new Label() { Text = "  " + "Culture", HeightRequest = 40, WidthRequest = width / 2, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray };
			label12 = new Label() { Text = "  " + "AllowNull", HeightRequest = 40, WidthRequest = width / 2, HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.Center, TextColor = Color.Gray };
			label1.FontAttributes = FontAttributes.None;
			label1.FontSize = 22;
			label2.FontAttributes = FontAttributes.None;
			label2.FontSize = 20;
			label3.FontAttributes = FontAttributes.None;
			label3.FontSize = 20;
			label4.FontAttributes = FontAttributes.None;
			label4.FontSize = 18;
			label5.FontAttributes = FontAttributes.None;
			label5.FontSize = 18;
			label6.FontAttributes = FontAttributes.None;
			label6.FontSize = 18;
			label7.FontAttributes = FontAttributes.None;
			label7.FontSize = 18;
			label11.FontAttributes = FontAttributes.None;
			label11.FontSize = 20;
			label12.FontAttributes = FontAttributes.None;
			label12.FontSize = 20;
			label12.YAlign = TextAlignment.Center;
            toggle1 = new Switch();
            toggle1.IsToggled = true;
            toggle1.HorizontalOptions = LayoutOptions.Start;
            toggle1.VerticalOptions = LayoutOptions.Center;
            toggle1.Toggled += (object sender, ToggledEventArgs e) =>
            {
                numericTextBox1.AllowNull = e.Value;
                numericTextBox2.AllowNull = e.Value;
                numericTextBox3.AllowNull = e.Value;
                numericTextBox4.AllowNull = e.Value;
            };
            picker = new PickerExt();
            picker.VerticalOptions = LayoutOptions.Start;
            picker.Items.Add("United States");
            picker.Items.Add("United Kingdom");
            picker.Items.Add("Japan");
            picker.Items.Add("France");
            picker.Items.Add("Italy");
			picker.SelectedIndexChanged+= (object sender, EventArgs e) =>
            {
                switch (picker.SelectedIndex)
                {
                    case 0:
                        {
                            numericTextBox1.Culture = new System.Globalization.CultureInfo("en-US");
                            numericTextBox2.Culture = new System.Globalization.CultureInfo("en-US");
                            numericTextBox4.Culture = new System.Globalization.CultureInfo("en-US");
                            numericTextBox3.Culture = new System.Globalization.CultureInfo("en-US");
                        }
                        break;
                    case 1:
                        {
                            numericTextBox1.Culture = new System.Globalization.CultureInfo("en-GB");
                            numericTextBox2.Culture = new System.Globalization.CultureInfo("en-GB");
                            numericTextBox3.Culture = new System.Globalization.CultureInfo("en-GB");
                            numericTextBox4.Culture = new System.Globalization.CultureInfo("en-GB");
                        }
                        break;
                    case 2:
                        {
                            numericTextBox1.Culture = new System.Globalization.CultureInfo("ja-JP");
                            numericTextBox2.Culture = new System.Globalization.CultureInfo("ja-JP");
                            numericTextBox3.Culture = new System.Globalization.CultureInfo("ja-JP");
                            numericTextBox4.Culture = new System.Globalization.CultureInfo("ja-JP");
                        }
                        break;
                    case 3:
                        {
                            numericTextBox1.Culture = new System.Globalization.CultureInfo("fr-FR");
                            numericTextBox2.Culture = new System.Globalization.CultureInfo("fr-FR");
                            numericTextBox3.Culture = new System.Globalization.CultureInfo("fr-FR");
                            numericTextBox4.Culture = new System.Globalization.CultureInfo("fr-FR");
                        }
                        break;
                    case 4:
                        {
                            numericTextBox1.Culture = new System.Globalization.CultureInfo("it-IT");
                            numericTextBox2.Culture = new System.Globalization.CultureInfo("it-IT");
                            numericTextBox3.Culture = new System.Globalization.CultureInfo("it-IT");
                            numericTextBox4.Culture = new System.Globalization.CultureInfo("it-IT");
                        }
                        break;
                }
            };
            numericTextBox1 = new SfNumericTextBox();
            numericTextBox1.Watermark = "Enter Principal";
            numericTextBox1.AllowNull = true;
            numericTextBox1.MaximumNumberDecimalDigits = 2;
			numericTextBox1.ValueChangeMode = ValueChangeMode.OnKeyFocus;
            numericTextBox1.FormatString = "c";
            numericTextBox1.Value = 1000;
            numericTextBox1.HorizontalOptions = LayoutOptions.End;
            numericTextBox1.VerticalOptions = LayoutOptions.Center;
			numericTextBox1.ValueChanged+= (object sender, ValueEventArgs e) => 
			{
				numericTextBox4.Value = numericTextBox2.Value*e.Value*numericTextBox3.Value;
			};



			numericTextBox1.Culture = new System.Globalization.CultureInfo("en-US");
		
            numericTextBox2 = new SfNumericTextBox();
            numericTextBox2.Watermark = "Enter RI";
            numericTextBox2.AllowNull = true;
            numericTextBox2.MaximumNumberDecimalDigits = 0;
			numericTextBox2.PercentDisplayMode = PercentDisplayMode.Compute;
			numericTextBox2.ValueChangeMode = ValueChangeMode.OnKeyFocus;
            numericTextBox2.FormatString = "p";
            numericTextBox2.Value = 0.1f;
            numericTextBox2.HorizontalOptions = LayoutOptions.End;
            numericTextBox2.VerticalOptions = LayoutOptions.Center;
			numericTextBox2.Culture = new System.Globalization.CultureInfo("en-US");
			numericTextBox2.ValueChanged+= (object sender, ValueEventArgs e) => 
			{
				numericTextBox4.Value = numericTextBox1.Value*e.Value*numericTextBox3.Value;
			};
            numericTextBox3 = new SfNumericTextBox();
            numericTextBox3.Watermark = "Enter Years";
            numericTextBox3.AllowNull = true;
            numericTextBox3.MaximumNumberDecimalDigits = 0;
			numericTextBox3.ValueChangeMode = ValueChangeMode.OnKeyFocus;
            numericTextBox3.FormatString = "years";
            numericTextBox3.Value = 20;
            numericTextBox3.HorizontalOptions = LayoutOptions.End;
            numericTextBox3.VerticalOptions = LayoutOptions.Center;
			numericTextBox3.ValueChanged+= (object sender, ValueEventArgs e) => 
			{
				numericTextBox4.Value = numericTextBox1.Value*numericTextBox2.Value*e.Value;
			};
			numericTextBox3.Culture = new System.Globalization.CultureInfo("en-US");

            numericTextBox4 = new SfNumericTextBox();
            numericTextBox4.Watermark = "Enter a number";
            numericTextBox4.AllowNull = true;
            numericTextBox4.MaximumNumberDecimalDigits = 0;
            numericTextBox4.ValueChangeMode = ValueChangeMode.OnKeyFocus;
            numericTextBox4.HorizontalOptions = LayoutOptions.End;
            numericTextBox4.FormatString = "c";
			numericTextBox4.Value = (float)1000*0.1*20;
            numericTextBox4.VerticalOptions = LayoutOptions.Center;
			numericTextBox4.Culture = new System.Globalization.CultureInfo("en-US");
			numericTextBox4.IsEnabled = false;
			this.BackgroundColor = Color.White;

            if (Device.OS == TargetPlatform.iOS)
            {
				numericTextBox1.WidthRequest = width / 2;
                numericTextBox2.WidthRequest = width / 2;
                numericTextBox3.WidthRequest = width / 2;
                numericTextBox4.WidthRequest = width / 2;
                toggle1.WidthRequest = width / 2;
            }
            else if (Device.OS == TargetPlatform.WinPhone)
            {
                numericTextBox1.WidthRequest = width / 2;
                numericTextBox2.WidthRequest = width / 2;
                numericTextBox3.WidthRequest = width / 2;
                numericTextBox4.WidthRequest = width / 2;
                toggle1.WidthRequest = width / 2;
                toggle1.HorizontalOptions = LayoutOptions.End;
                label1.TextColor = Color.White;
                label2.TextColor = Color.White;
                label3.TextColor = Color.White;
                label4.TextColor = Color.White;
                label5.TextColor = Color.White;
                label6.TextColor = Color.White;
                label7.TextColor = Color.White;
                numericTextBox1.BackgroundColor = Color.White;
                numericTextBox2.BackgroundColor = Color.White;
                numericTextBox3.BackgroundColor = Color.White;
                numericTextBox4.BackgroundColor = Color.White;
                numericTextBox2.FormatString = "0 %";
                numericTextBox3.FormatString = "0 years";
                this.BackgroundColor = Color.Black;
            }
            else
            {
                
                numericTextBox1.WidthRequest = width / 3;
                numericTextBox2.WidthRequest = width / 3;
                numericTextBox3.WidthRequest = width / 3;
                numericTextBox4.WidthRequest = width / 3;
            }
		    if (Device.OS == TargetPlatform.Windows)
		    {
                label1.TextColor = Color.Gray;
                label2.TextColor = Color.Gray;
                label3.TextColor = Color.Gray;
                label4.TextColor = Color.Gray;
                label5.TextColor = Color.Gray;
                label6.TextColor = Color.Gray;
                label7.TextColor = Color.Gray;
                numericTextBox1.BackgroundColor = Color.White;
                numericTextBox2.BackgroundColor = Color.White;
                numericTextBox3.BackgroundColor = Color.White;
                numericTextBox4.BackgroundColor = Color.White;
                this.BackgroundColor = Color.Black;
                numericTextBox2.FormatString = "0 %";
                numericTextBox3.FormatString = "0 years";
		        if (Device.Idiom != TargetIdiom.Tablet)
		        {
		            numericTextBox4.IsEnabled = true;
		        }
		    }
		    this.ContentView = GetNumeric();
            PropertyView = GetOptionPage();
        }
        public void getPropertiesWindow()
        {
            view = new StackLayout();

            view.HeightRequest   = Property_Windows.HeightRequest;
            view.BackgroundColor = Color.FromRgb(250, 250, 250);

            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);
            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);
            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 18;
            closeButton = new Button();
            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked += Close_Button;

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);
            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);


            StackLayout placementLayout = new StackLayout();

            placementLayout.Orientation = StackOrientation.Horizontal;
            placementLayout.Padding     = new Thickness(40, 0, 0, 20);
            placementLabel                    = new Label();
            placementLabel.Text               = "Tick Placement";
            placementLabel.WidthRequest       = 250;
            placementLabel.VerticalOptions    = LayoutOptions.Center;
            placementLabel.HorizontalOptions  = LayoutOptions.End;
            placementLabel.FontFamily         = "Helvetica";
            placementLabel.FontSize           = 16;
            positionPicker1                   = new PickerExt();
            positionPicker1.WidthRequest      = 150;
            positionPicker1.VerticalOptions   = LayoutOptions.Center;
            positionPicker1.HorizontalOptions = LayoutOptions.Start;
            positionPicker1.Items.Add("TopLeft");
            positionPicker1.Items.Add("BottomRight");
            positionPicker1.Items.Add("Inline");
            positionPicker1.Items.Add("Outside");
            positionPicker1.Items.Add("None");
            positionPicker1.SelectedIndex = tick;

            positionPicker1.SelectedIndexChanged += picker1_SelectedIndexChanged;
            placementLayout.Children.Add(placementLabel);
            placementLayout.Children.Add(positionPicker1);

            StackLayout labelLayout = new StackLayout();

            labelLayout.Orientation = StackOrientation.Horizontal;
            labelLayout.Padding     = new Thickness(40, 0, 0, 20);
            tickLabel                   = new Label();
            tickLabel.Text              = "Label Placement";
            tickLabel.WidthRequest      = 250;
            tickLabel.VerticalOptions   = LayoutOptions.Center;
            tickLabel.HorizontalOptions = LayoutOptions.End;
            tickLabel.FontFamily        = "Helvetica";
            tickLabel.FontSize          = 16;
            positionPicker2             = new PickerExt();
            positionPicker2.Items.Add("TopLeft");
            positionPicker2.Items.Add("BottomRight");
            positionPicker2.SelectedIndex     = label;
            positionPicker2.WidthRequest      = 150;
            positionPicker2.VerticalOptions   = LayoutOptions.Center;
            positionPicker2.HorizontalOptions = LayoutOptions.Start;

            positionPicker2.SelectedIndexChanged += picker2_SelectedIndexChanged;

            labelLayout.Children.Add(tickLabel);
            labelLayout.Children.Add(positionPicker2);


            StackLayout layoutLabel = new StackLayout();

            layoutLabel.Orientation = StackOrientation.Horizontal;
            layoutLabel.Padding     = new Thickness(40, 0, 0, 20);
            emptyLabel                     = new Label();
            emptyLabel.Text                = "Show Label";
            emptyLabel.WidthRequest        = 250;
            emptyLabel.HorizontalOptions   = LayoutOptions.End;
            emptyLabel.VerticalOptions     = LayoutOptions.Center;
            emptyLabel.FontFamily          = "Helvetica";
            emptyLabel.FontSize            = 16;
            toggleButton                   = new Switch();
            toggleButton.Toggled          += toggleStateChanged;
            toggleButton.IsToggled         = tooltip;
            toggleButton.HorizontalOptions = LayoutOptions.Start;
            toggleButton.VerticalOptions   = LayoutOptions.Center;
            layoutLabel.Children.Add(emptyLabel);
            layoutLabel.Children.Add(toggleButton);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            emptyLayout.Padding         = new Thickness(40, 20, 40, 40);
            if (Device.OS == TargetPlatform.iOS)
            {
                emptyLayout.Padding = new Thickness(170, 20, 40, 40);
            }

            emptyLayout.Children.Add(placementLayout);
            emptyLayout.Children.Add(labelLayout);
            emptyLayout.Children.Add(layoutLabel);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);

            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);
        }
Beispiel #12
0
        public void getPropertiesWindow()
        {
            if (Device.OS == TargetPlatform.iOS)
            {
                Property_Windows.HeightRequest = 400;
            }
            view = new StackLayout();
            suggestionModepicker      = new PickerExt();
            autoCompleteModepicker    = new PickerExt();
            minPrefixCharacterText    = new Entry();
            maximumDropDownHeightText = new Entry();

            view.HeightRequest   = Property_Windows.HeightRequest;
            view.BackgroundColor = Color.FromRgb(250, 250, 250);

            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);
            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);
            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 18;
            closeButton = new Button();

            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked            += Close_Button;
            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            if (Device.OS == TargetPlatform.iOS)
            {
                emptyLayout.Padding = new Thickness(30, 10, 40, 0);
            }
            else
            {
                emptyLayout.Padding = new Thickness(30, 10, 40, 10);
            }

            StackLayout suggestionLayout = new StackLayout();

            suggestionLayout.Orientation = StackOrientation.Horizontal;
            if (Device.OS == TargetPlatform.iOS)
            {
                suggestionLayout.Padding = new Thickness(0, 10, 0, 20);
            }
            else
            {
                suggestionLayout.Padding = new Thickness(0, 0, 0, 0);
            }
            Label suggestionLabel = new Label();

            suggestionLabel.Text                   = "Suggestion Mode";
            suggestionLabel.WidthRequest           = 250;
            suggestionLabel.VerticalOptions        = LayoutOptions.Center;
            suggestionLabel.HorizontalOptions      = LayoutOptions.EndAndExpand;
            suggestionLabel.FontFamily             = "Helvetica";
            suggestionLabel.FontSize               = 16;
            suggestionModepicker.IsEnabled         = true;
            suggestionModepicker.WidthRequest      = 250;
            suggestionModepicker.HorizontalOptions = LayoutOptions.StartAndExpand;
            suggestionModepicker.VerticalOptions   = LayoutOptions.Center;
            suggestionLayout.Children.Add(suggestionLabel);
            suggestionLayout.Children.Add(suggestionModepicker);

            StackLayout modeLayout = new StackLayout();

            modeLayout.Orientation = StackOrientation.Horizontal;
            if (Device.OS == TargetPlatform.iOS)
            {
                modeLayout.Padding = new Thickness(0, 20, 0, 20);
            }
            else
            {
                modeLayout.Padding = new Thickness(0, 20, 0, 0);
            }

            Label modeLabel = new Label();

            modeLabel.Text                           = "AutoComplete Mode";
            modeLabel.WidthRequest                   = 250;
            modeLabel.VerticalOptions                = LayoutOptions.Center;
            modeLabel.HorizontalOptions              = LayoutOptions.EndAndExpand;
            modeLabel.FontFamily                     = "Helvetica";
            modeLabel.FontSize                       = 16;
            autoCompleteModepicker.WidthRequest      = 250;
            autoCompleteModepicker.IsEnabled         = true;
            autoCompleteModepicker.HorizontalOptions = LayoutOptions.StartAndExpand;
            autoCompleteModepicker.VerticalOptions   = LayoutOptions.Center;
            modeLayout.Children.Add(modeLabel);
            modeLayout.Children.Add(autoCompleteModepicker);

            //SuggestionModePicker Items

            suggestionModepicker.Items.Add("StartsWith");
            suggestionModepicker.Items.Add("StartsWithCaseSensitive");
            suggestionModepicker.Items.Add("Contains");
            suggestionModepicker.Items.Add("ContainsWithCaseSensitive");
            suggestionModepicker.Items.Add("EndsWith");
            suggestionModepicker.Items.Add("EndsWithCaseSensitive");
            suggestionModepicker.Items.Add("Equals");
            suggestionModepicker.Items.Add("EqualsWithCaseSensitive");
            suggestionModepicker.SelectedIndexChanged += SelectionIndex_Changed;

            //AutoCompleteModePicker Items

            autoCompleteModepicker.Items.Add("Append");
            autoCompleteModepicker.Items.Add("Suggest");
            autoCompleteModepicker.Items.Add("SuggestAppend");
            autoCompleteModepicker.SelectedIndexChanged += autoCompleteModepicker_Changed;

            autoCompleteModepicker.SelectedIndex = autocompletemode;
            suggestionModepicker.SelectedIndex   = suggestion;

            StackLayout prefixLabelLayout = new StackLayout();

            prefixLabelLayout.Orientation = StackOrientation.Horizontal;
            if (Device.OS == TargetPlatform.iOS)
            {
                prefixLabelLayout.Padding = new Thickness(5, 20, 0, 20);
            }
            else
            {
                prefixLabelLayout.Padding = new Thickness(0, 20, 0, 0);
            }
            minimumPrefixCharacterLabel      = new Label();
            minimumPrefixCharacterLabel.Text = "Minimum Prefix Character";
            if (Device.OS == TargetPlatform.iOS)
            {
                minimumPrefixCharacterLabel.WidthRequest = 250;
            }
            else
            {
                minimumPrefixCharacterLabel.WidthRequest = 250;
            }
            minimumPrefixCharacterLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            minimumPrefixCharacterLabel.VerticalOptions   = LayoutOptions.Center;
            minimumPrefixCharacterLabel.FontFamily        = "Helvetica";
            minimumPrefixCharacterLabel.FontSize          = 16;
            if (Device.OS == TargetPlatform.iOS)
            {
                minPrefixCharacterText.WidthRequest = 250;
            }
            else
            {
                minPrefixCharacterText.WidthRequest = 250;
            }

            minPrefixCharacterText.Keyboard          = Keyboard.Numeric;
            minPrefixCharacterText.VerticalOptions   = LayoutOptions.Center;
            minPrefixCharacterText.HorizontalOptions = LayoutOptions.StartAndExpand;
            minPrefixCharacterText.FontFamily        = "Helvetica";
            minPrefixCharacterText.FontSize          = 16;
            //	minPrefixCharacterText.HorizontalTextAlignment = TextAlignment.Center;
            minPrefixCharacterText.Text         = minpref.ToString();
            minPrefixCharacterText.TextChanged += PrefixCharacter_Changed;
            prefixLabelLayout.Children.Add(minimumPrefixCharacterLabel);
            prefixLabelLayout.Children.Add(minPrefixCharacterText);

            StackLayout dropDownLabelLayout = new StackLayout();

            dropDownLabelLayout.Orientation = StackOrientation.Horizontal;
            if (Device.OS == TargetPlatform.iOS)
            {
                dropDownLabelLayout.Padding = new Thickness(5, 20, 0, 20);
            }
            else
            {
                dropDownLabelLayout.Padding = new Thickness(0, 20, 0, 0);
            }
            maximumDropDownHeightLabel      = new Label();
            maximumDropDownHeightLabel.Text = "Maximum DropDown Height";
            if (Device.OS == TargetPlatform.iOS)
            {
                maximumDropDownHeightLabel.WidthRequest = 250;
            }
            else
            {
                maximumDropDownHeightLabel.WidthRequest = 250;
            }
            maximumDropDownHeightLabel.VerticalOptions   = LayoutOptions.Center;
            maximumDropDownHeightLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            maximumDropDownHeightLabel.FontFamily        = "Helvetica";
            maximumDropDownHeightLabel.FontSize          = 16;
            maximumDropDownHeightText = new Entry();
            if (Device.OS == TargetPlatform.iOS)
            {
                maximumDropDownHeightText.WidthRequest = 250;
            }
            else
            {
                maximumDropDownHeightText.WidthRequest = 250;
            }
            maximumDropDownHeightText.VerticalOptions   = LayoutOptions.Center;
            maximumDropDownHeightText.HorizontalOptions = LayoutOptions.StartAndExpand;
            maximumDropDownHeightText.FontFamily        = "Helvetica";
            //	maximumDropDownHeightText.HorizontalTextAlignment = TextAlignment.Center;
            maximumDropDownHeightText.FontSize     = 16;
            maximumDropDownHeightText.Keyboard     = Keyboard.Numeric;
            maximumDropDownHeightText.Text         = maxDrop.ToString();
            maximumDropDownHeightText.TextChanged += MaximumHeight_Changed;
            dropDownLabelLayout.Children.Add(maximumDropDownHeightLabel);
            dropDownLabelLayout.Children.Add(maximumDropDownHeightText);

            StackLayout PopUpLayout = new StackLayout();

            PopUpLayout.Orientation = StackOrientation.Horizontal;
            if (Device.OS == TargetPlatform.iOS)
            {
                PopUpLayout.Padding = new Thickness(5, 20, 0, 20);
            }
            else
            {
                PopUpLayout.Padding = new Thickness(0, 20, 0, 0);
            }

            popupDelayLabel      = new Label();
            popupDelayLabel.Text = "PopUp Delay";
            if (Device.OS == TargetPlatform.iOS)
            {
                popupDelayLabel.WidthRequest = 250;
            }
            else
            {
                popupDelayLabel.WidthRequest = 250;
            }
            popupDelayLabel.VerticalOptions   = LayoutOptions.Center;
            popupDelayLabel.HorizontalOptions = LayoutOptions.EndAndExpand;
            popupDelayLabel.FontFamily        = "Helvetica";
            popupDelayLabel.FontSize          = 16;
            PopupDelayText = new Entry();
            if (Device.OS == TargetPlatform.iOS)
            {
                PopupDelayText.WidthRequest = 250;
            }
            else
            {
                PopupDelayText.WidthRequest = 250;
            }
            PopupDelayText.VerticalOptions   = LayoutOptions.Center;
            PopupDelayText.HorizontalOptions = LayoutOptions.StartAndExpand;
            //PopupDelayText.HorizontalTextAlignment = TextAlignment.Center;
            PopupDelayText.FontFamily   = "Helvetica";
            PopupDelayText.Keyboard     = Keyboard.Numeric;
            PopupDelayText.FontSize     = 16;
            PopupDelayText.Text         = pop.ToString();
            PopupDelayText.TextChanged += PopUp_Changed;
            PopUpLayout.Children.Add(popupDelayLabel);
            PopUpLayout.Children.Add(PopupDelayText);

            emptyLayout.Children.Add(suggestionLayout);
            emptyLayout.Children.Add(modeLayout);
            emptyLayout.Children.Add(prefixLabelLayout);
            emptyLayout.Children.Add(dropDownLabelLayout);
            emptyLayout.Children.Add(PopUpLayout);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);
            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);
        }
        public NumericTextBox()
        {
            double height = Bounds.Height;
            double width  = App.ScreenWidth;

            if (Device.Idiom == TargetIdiom.Tablet)
            {
                width /= 2;
            }

            label1 = new Label()
            {
                Text = "Simple Interest Calculator", HeightRequest = 40, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black
            };
            label2 = new Label()
            {
                Text = "The formula for finding simple interest is :", HeightRequest = 45, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black
            };
            label3 = new Label()
            {
                Text = "Interest = Principal * Rate * Time", HeightRequest = 40, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Black
            };
            label4 = new Label()
            {
                Text = "Principal", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black
            };
            label5 = new Label()
            {
                Text = "Interest Rate", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black
            };
            label6 = new Label()
            {
                Text = "Term", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black
            };
            label7 = new Label()
            {
                Text = "Interest", HeightRequest = 40, WidthRequest = width / 2, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black
            };
            label11 = new Label()
            {
                Text = "  " + "Culture", HeightRequest = 40, WidthRequest = width / 2, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label12 = new Label()
            {
                Text = "  " + "AllowNull", HeightRequest = 40, WidthRequest = width / 2, HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.Center, TextColor = Color.Gray
            };
            label1.FontAttributes  = FontAttributes.None;
            label1.FontSize        = 22;
            label2.FontAttributes  = FontAttributes.None;
            label2.FontSize        = 20;
            label3.FontAttributes  = FontAttributes.None;
            label3.FontSize        = 20;
            label4.FontAttributes  = FontAttributes.None;
            label4.FontSize        = 18;
            label5.FontAttributes  = FontAttributes.None;
            label5.FontSize        = 18;
            label6.FontAttributes  = FontAttributes.None;
            label6.FontSize        = 18;
            label7.FontAttributes  = FontAttributes.None;
            label7.FontSize        = 18;
            label11.FontAttributes = FontAttributes.None;
            label11.FontSize       = 20;
            label12.FontAttributes = FontAttributes.None;
            label12.FontSize       = 20;
            label12.YAlign         = TextAlignment.Center;
            toggle1                   = new Switch();
            toggle1.IsToggled         = true;
            toggle1.HorizontalOptions = LayoutOptions.Start;
            toggle1.VerticalOptions   = LayoutOptions.Center;
            toggle1.Toggled          += (object sender, ToggledEventArgs e) =>
            {
                numericTextBox1.AllowNull = e.Value;
                numericTextBox2.AllowNull = e.Value;
                numericTextBox3.AllowNull = e.Value;
                numericTextBox4.AllowNull = e.Value;
            };
            picker = new PickerExt();
            picker.VerticalOptions = LayoutOptions.Start;
            picker.Items.Add("United States");
            picker.Items.Add("United Kingdom");
            picker.Items.Add("Japan");
            picker.Items.Add("France");
            picker.Items.Add("Italy");
            picker.SelectedIndexChanged += (object sender, EventArgs e) =>
            {
                switch (picker.SelectedIndex)
                {
                case 0:
                {
                    numericTextBox1.Culture = new System.Globalization.CultureInfo("en-US");
                    numericTextBox2.Culture = new System.Globalization.CultureInfo("en-US");
                    numericTextBox4.Culture = new System.Globalization.CultureInfo("en-US");
                    numericTextBox3.Culture = new System.Globalization.CultureInfo("en-US");
                }
                break;

                case 1:
                {
                    numericTextBox1.Culture = new System.Globalization.CultureInfo("en-GB");
                    numericTextBox2.Culture = new System.Globalization.CultureInfo("en-GB");
                    numericTextBox3.Culture = new System.Globalization.CultureInfo("en-GB");
                    numericTextBox4.Culture = new System.Globalization.CultureInfo("en-GB");
                }
                break;

                case 2:
                {
                    numericTextBox1.Culture = new System.Globalization.CultureInfo("ja-JP");
                    numericTextBox2.Culture = new System.Globalization.CultureInfo("ja-JP");
                    numericTextBox3.Culture = new System.Globalization.CultureInfo("ja-JP");
                    numericTextBox4.Culture = new System.Globalization.CultureInfo("ja-JP");
                }
                break;

                case 3:
                {
                    numericTextBox1.Culture = new System.Globalization.CultureInfo("fr-FR");
                    numericTextBox2.Culture = new System.Globalization.CultureInfo("fr-FR");
                    numericTextBox3.Culture = new System.Globalization.CultureInfo("fr-FR");
                    numericTextBox4.Culture = new System.Globalization.CultureInfo("fr-FR");
                }
                break;

                case 4:
                {
                    numericTextBox1.Culture = new System.Globalization.CultureInfo("it-IT");
                    numericTextBox2.Culture = new System.Globalization.CultureInfo("it-IT");
                    numericTextBox3.Culture = new System.Globalization.CultureInfo("it-IT");
                    numericTextBox4.Culture = new System.Globalization.CultureInfo("it-IT");
                }
                break;
                }
            };
            numericTextBox1           = new SfNumericTextBox();
            numericTextBox1.Watermark = "Enter Principal";
            numericTextBox1.AllowNull = true;
            numericTextBox1.MaximumNumberDecimalDigits = 2;
            numericTextBox1.ValueChangeMode            = ValueChangeMode.OnKeyFocus;
            numericTextBox1.FormatString      = "c";
            numericTextBox1.Value             = 1000;
            numericTextBox1.HorizontalOptions = LayoutOptions.End;
            numericTextBox1.VerticalOptions   = LayoutOptions.Center;
            numericTextBox1.ValueChanged     += (object sender, ValueEventArgs e) =>
            {
                numericTextBox4.Value = numericTextBox2.Value * e.Value * numericTextBox3.Value;
            };



            numericTextBox1.Culture = new System.Globalization.CultureInfo("en-US");

            numericTextBox2           = new SfNumericTextBox();
            numericTextBox2.Watermark = "Enter RI";
            numericTextBox2.AllowNull = true;
            numericTextBox2.MaximumNumberDecimalDigits = 0;
            numericTextBox2.PercentDisplayMode         = PercentDisplayMode.Compute;
            numericTextBox2.ValueChangeMode            = ValueChangeMode.OnKeyFocus;
            numericTextBox2.FormatString      = "p";
            numericTextBox2.Value             = 0.1f;
            numericTextBox2.HorizontalOptions = LayoutOptions.End;
            numericTextBox2.VerticalOptions   = LayoutOptions.Center;
            numericTextBox2.Culture           = new System.Globalization.CultureInfo("en-US");
            numericTextBox2.ValueChanged     += (object sender, ValueEventArgs e) =>
            {
                numericTextBox4.Value = numericTextBox1.Value * e.Value * numericTextBox3.Value;
            };
            numericTextBox3           = new SfNumericTextBox();
            numericTextBox3.Watermark = "Enter Years";
            numericTextBox3.AllowNull = true;
            numericTextBox3.MaximumNumberDecimalDigits = 0;
            numericTextBox3.ValueChangeMode            = ValueChangeMode.OnKeyFocus;
            numericTextBox3.FormatString      = "years";
            numericTextBox3.Value             = 20;
            numericTextBox3.HorizontalOptions = LayoutOptions.End;
            numericTextBox3.VerticalOptions   = LayoutOptions.Center;
            numericTextBox3.ValueChanged     += (object sender, ValueEventArgs e) =>
            {
                numericTextBox4.Value = numericTextBox1.Value * numericTextBox2.Value * e.Value;
            };
            numericTextBox3.Culture = new System.Globalization.CultureInfo("en-US");

            numericTextBox4           = new SfNumericTextBox();
            numericTextBox4.Watermark = "Enter a number";
            numericTextBox4.AllowNull = true;
            numericTextBox4.MaximumNumberDecimalDigits = 0;
            numericTextBox4.ValueChangeMode            = ValueChangeMode.OnKeyFocus;
            numericTextBox4.HorizontalOptions          = LayoutOptions.End;
            numericTextBox4.FormatString    = "c";
            numericTextBox4.Value           = (float)1000 * 0.1 * 20;
            numericTextBox4.VerticalOptions = LayoutOptions.Center;
            numericTextBox4.Culture         = new System.Globalization.CultureInfo("en-US");
            numericTextBox4.IsEnabled       = false;
            this.BackgroundColor            = Color.White;

            if (Device.OS == TargetPlatform.iOS)
            {
                numericTextBox1.WidthRequest = width / 2;
                numericTextBox2.WidthRequest = width / 2;
                numericTextBox3.WidthRequest = width / 2;
                numericTextBox4.WidthRequest = width / 2;
                toggle1.WidthRequest         = width / 2;
            }
            else if (Device.OS == TargetPlatform.WinPhone)
            {
                numericTextBox1.WidthRequest    = width / 2;
                numericTextBox2.WidthRequest    = width / 2;
                numericTextBox3.WidthRequest    = width / 2;
                numericTextBox4.WidthRequest    = width / 2;
                toggle1.WidthRequest            = width / 2;
                toggle1.HorizontalOptions       = LayoutOptions.End;
                label1.TextColor                = Color.White;
                label2.TextColor                = Color.White;
                label3.TextColor                = Color.White;
                label4.TextColor                = Color.White;
                label5.TextColor                = Color.White;
                label6.TextColor                = Color.White;
                label7.TextColor                = Color.White;
                numericTextBox1.BackgroundColor = Color.White;
                numericTextBox2.BackgroundColor = Color.White;
                numericTextBox3.BackgroundColor = Color.White;
                numericTextBox4.BackgroundColor = Color.White;
                numericTextBox2.FormatString    = "0 %";
                numericTextBox3.FormatString    = "0 years";
                this.BackgroundColor            = Color.Black;
            }
            else
            {
                numericTextBox1.WidthRequest = width / 3;
                numericTextBox2.WidthRequest = width / 3;
                numericTextBox3.WidthRequest = width / 3;
                numericTextBox4.WidthRequest = width / 3;
            }
            if (Device.OS == TargetPlatform.Windows)
            {
                label1.TextColor = Color.Gray;
                label2.TextColor = Color.Gray;
                label3.TextColor = Color.Gray;
                label4.TextColor = Color.Gray;
                label5.TextColor = Color.Gray;
                label6.TextColor = Color.Gray;
                label7.TextColor = Color.Gray;
                numericTextBox1.BackgroundColor = Color.White;
                numericTextBox2.BackgroundColor = Color.White;
                numericTextBox3.BackgroundColor = Color.White;
                numericTextBox4.BackgroundColor = Color.White;
                this.BackgroundColor            = Color.Black;
                numericTextBox2.FormatString    = "0 %";
                numericTextBox3.FormatString    = "0 years";
                if (Device.Idiom != TargetIdiom.Tablet)
                {
                    numericTextBox4.IsEnabled = true;
                }
            }
            this.ContentView = GetNumeric();
            PropertyView     = GetOptionPage();
        }
        public void getPropertiesWindow()
        {
            view = new StackLayout();
            if (Device.OS == TargetPlatform.iOS)
            {
                Property_Windows.HeightRequest = 250;
            }

            view.HeightRequest   = Property_Windows.HeightRequest;
            view.BackgroundColor = Color.FromRgb(250, 250, 250);

            //Sub Layouts added
            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            emptyLayout.Padding         = new Thickness(40, 20, 40, 40);

            StackLayout precisionLayout = new StackLayout();

            precisionLayout.HeightRequest = 60;
            precisionLayout.Orientation   = StackOrientation.Horizontal;

            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);

            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 18;
            closeButton          = new Button();
            closeButton.Clicked += Close_Button;

            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);
            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            Label precisionLabel = new Label();

            precisionLabel.Text              = "Precision";
            precisionLabel.WidthRequest      = 200;
            precisionLabel.VerticalOptions   = LayoutOptions.Center;
            precisionLabel.HorizontalOptions = LayoutOptions.End;
            precisionLabel.FontFamily        = "Helvetica";
            precisionLabel.FontSize          = 16;
            precisionPicker = new PickerExt();
            precisionPicker.WidthRequest = 150;
            precisionPicker.Items.Add("Standard");
            precisionPicker.Items.Add("Half");
            precisionPicker.Items.Add("Exact");
            precisionPicker.SelectedIndex         = precision;
            precisionPicker.HorizontalOptions     = LayoutOptions.Start;
            precisionPicker.VerticalOptions       = LayoutOptions.Center;
            precisionPicker.SelectedIndexChanged += precisionPicker_SelectedIndexChanged;
            precisionLayout.Children.Add(precisionLabel);
            precisionLayout.Children.Add(precisionPicker);

            StackLayout toolTipLayout = new StackLayout();

            toolTipLayout.HeightRequest = 60;
            toolTipLayout.Padding       = new Thickness(80, 0, 0, 0);
            toolTipLayout.Orientation   = StackOrientation.Horizontal;
            toolTipLabel = new Label();
            toolTipLabel.WidthRequest      = 200;
            toolTipLabel.Text              = "Show Tooltip";
            toolTipLabel.VerticalOptions   = LayoutOptions.Center;
            toolTipLabel.HorizontalOptions = LayoutOptions.End;
            toolTipLabel.FontFamily        = "Helvetica";
            toolTipLabel.FontSize          = 16;

            toolTipPlacementOption                   = new Switch();
            toolTipPlacementOption.Toggled          += toggleStateChanged;
            toolTipPlacementOption.IsToggled         = tooltip;
            toolTipPlacementOption.HorizontalOptions = LayoutOptions.Start;
            toolTipPlacementOption.VerticalOptions   = LayoutOptions.Center;
            toolTipLayout.Children.Add(toolTipLabel);
            toolTipLayout.Children.Add(toolTipPlacementOption);

            StackLayout itemCountLayout = new StackLayout();

            itemCountLayout.HeightRequest = 60;
            itemCountLayout.Orientation   = StackOrientation.Horizontal;
            itemCountLabel = new Label();
            itemCountLabel.WidthRequest      = 200;
            itemCountLabel.Text              = "Items Count";
            itemCountLabel.HorizontalOptions = LayoutOptions.End;
            itemCountLabel.VerticalOptions   = LayoutOptions.Center;
            itemCountLabel.FontFamily        = "Helvetica";
            itemCountLabel.FontSize          = 16;
            itemCountEntry = new Entry();
            itemCountEntry.WidthRequest      = 150;
            itemCountEntry.Keyboard          = Keyboard.Numeric;
            itemCountEntry.VerticalOptions   = LayoutOptions.Center;
            itemCountEntry.HorizontalOptions = LayoutOptions.Start;

            itemCountEntry.FontFamily   = "Helvetica";
            itemCountEntry.Text         = minpref.ToString();
            itemCountEntry.TextChanged += itemCountEntry_Changed;
            itemCountLayout.Children.Add(itemCountLabel);
            itemCountLayout.Children.Add(itemCountEntry);

            emptyLayout.Children.Add(precisionLayout);
            emptyLayout.Children.Add(toolTipLayout);
            emptyLayout.Children.Add(itemCountLayout);
            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);
            Property_Windows.Children.Remove(temp);
            Property_Windows.Children.Insert(0, view);

            if (Device.OS == TargetPlatform.Android)
            {
                sfRating1.ItemSize      = 17;
                sfRating2.ItemSize      = 40;
                sfRating2.ItemSpacing   = 7;
                toolTipLayout.Padding   = new Thickness(60, 0, 0, 0);
                itemCountLayout.Padding = new Thickness(60, 0, 0, 0);
                precisionLayout.Padding = new Thickness(60, 0, 0, 0);
            }
            else if (Device.OS == TargetPlatform.iOS)
            {
                itemCountEntry.HorizontalTextAlignment = TextAlignment.Center;
                closeButton.Text             = "X";
                closeButton.TextColor        = Color.FromRgb(51, 153, 255);
                precisionLayout.Padding      = new Thickness(150, 20, 0, 20);
                precisionLabel.WidthRequest  = 150;
                precisionPicker.WidthRequest = 200;
                itemCountLabel.WidthRequest  = 150;
                itemCountLayout.Padding      = new Thickness(150, 20, 0, 20);
                toolTipLabel.WidthRequest    = 150;
                toolTipLayout.HeightRequest  = 30;
                toolTipLayout.Padding        = new Thickness(150, 20, 0, 20);
            }
            else
            {
                closeButton.Image            = "sfclosebutton.png";
                precisionLayout.Padding      = new Thickness(80, 0, 0, 0);
                precisionPicker.WidthRequest = 150;
                precisionLabel.WidthRequest  = 195;
                itemCountLabel.WidthRequest  = 195;
                itemCountLayout.Padding      = new Thickness(80, 0, 0, 0);
                toolTipLabel.WidthRequest    = 195;
                toolTipLayout.HeightRequest  = 70;
            }
        }
Beispiel #15
0
        public AutoComplete()
        {
            label      = new Label();
            label.Text = "Type a country name to display the suggested list in the dropdown";
            label1     = new Label()
            {
                Text = "SuggestionMode", HeightRequest = 50, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label2 = new Label()
            {
                Text = "AutoCompleteMode", HeightRequest = 50, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label3 = new Label()
            {
                Text = "Max DropDown Height", HeightRequest = 40, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label4 = new Label()
            {
                Text = "Min Prefix Character", HeightRequest = 40, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label5 = new Label()
            {
                Text = "Popup Delay", HeightRequest = 40, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label1.FontAttributes = FontAttributes.None;
            label1.FontSize       = 20;
            label2.FontAttributes = FontAttributes.None;
            label2.FontSize       = 20;
            label3.FontAttributes = FontAttributes.None;
            label3.FontSize       = 20;
            label4.FontAttributes = FontAttributes.None;
            label4.FontSize       = 20;
            label5.FontAttributes = FontAttributes.None;
            label5.FontSize       = 20;
            text1               = new Entry();
            text2               = new Entry();
            text3               = new Entry();
            label1.YAlign       = TextAlignment.End;
            label2.YAlign       = TextAlignment.End;
            label3.YAlign       = TextAlignment.Center;
            label4.YAlign       = TextAlignment.Center;
            label5.YAlign       = TextAlignment.Center;
            text1.WidthRequest  = 80;
            text2.WidthRequest  = 80;
            text3.WidthRequest  = 80;
            text1.HeightRequest = 40;
            text2.HeightRequest = 40;
            text3.HeightRequest = 40;
            picker1             = new PickerExt();
            picker2             = new PickerExt();
            label3.WidthRequest = 300;
            label4.WidthRequest = 300;
            label5.WidthRequest = 300;
            picker1.Items.Add("StartsWith");
            picker1.Items.Add("StartsWithCaseSensitive");
            picker1.Items.Add("Contains");
            picker1.Items.Add("ContainsWithCaseSensitive");
            picker1.Items.Add("EndsWith");
            picker1.Items.Add("EndsWithCaseSensitive");
            picker1.Items.Add("Equals");
            picker1.Items.Add("EqualsWithCaseSensitive");

            picker2.Items.Add("Append");
            picker2.Items.Add("Suggest");
            picker2.Items.Add("SuggestAppend");
            picker1.SelectedIndex = 0;
            picker2.SelectedIndex = 1;
            text1.Text            = "300";
            text2.Text            = "2";
            text3.Text            = "100";
            text1.TextChanged    += (object sender, TextChangedEventArgs e) =>
            {
                if (e.NewTextValue.Length > 0)
                {
                    autocomplete1.MaximumDropDownHeight = int.Parse(e.NewTextValue);
                    autocomplete2.MaximumDropDownHeight = int.Parse(e.NewTextValue);
                }
                else
                {
                    autocomplete1.MaximumDropDownHeight = 100;
                    autocomplete2.MaximumDropDownHeight = 100;
                }
            };
            text2.TextChanged += (object sender, TextChangedEventArgs e) =>
            {
                if (e.NewTextValue.Length > 0)
                {
                    autocomplete1.MinimumPrefixCharacters = int.Parse(e.NewTextValue);
                    autocomplete2.MinimumPrefixCharacters = int.Parse(e.NewTextValue);
                }
                else
                {
                    autocomplete1.MinimumPrefixCharacters = 1;
                    autocomplete2.MinimumPrefixCharacters = 1;
                }
            };
            text3.TextChanged += (object sender, TextChangedEventArgs e) =>
            {
                if (e.NewTextValue.Length > 0)
                {
                    autocomplete1.PopupDelay = int.Parse(e.NewTextValue);
                    autocomplete2.PopupDelay = int.Parse(e.NewTextValue);
                }
                else
                {
                    autocomplete1.PopupDelay = 100;
                    autocomplete2.PopupDelay = 100;
                }
            };
            picker1.SelectedIndexChanged += (object sender, EventArgs e) => {
                switch (picker1.SelectedIndex)
                {
                case 0:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.StartsWith;
                    autocomplete2.SuggestionMode = SuggestionMode.StartsWith;
                }
                break;

                case 1:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.StartsWithCaseSensitive;
                    autocomplete2.SuggestionMode = SuggestionMode.StartsWithCaseSensitive;
                }
                break;

                case 2:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.Contains;
                    autocomplete2.SuggestionMode = SuggestionMode.Contains;
                }
                break;

                case 3:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.ContainsWithCaseSensitive;
                    autocomplete2.SuggestionMode = SuggestionMode.ContainsWithCaseSensitive;
                }
                break;

                case 4:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.EndsWith;
                    autocomplete2.SuggestionMode = SuggestionMode.EndsWith;
                }
                break;

                case 5:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.EndsWithCaseSensitive;
                    autocomplete2.SuggestionMode = SuggestionMode.EndsWithCaseSensitive;
                }
                break;

                case 6:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.Equals;
                    autocomplete2.SuggestionMode = SuggestionMode.Equals;
                }
                break;

                case 7:
                {
                    autocomplete1.SuggestionMode = SuggestionMode.EqualsWithCaseSensitive;
                    autocomplete2.SuggestionMode = SuggestionMode.EqualsWithCaseSensitive;
                }
                break;
                }
            };
            picker2.SelectedIndexChanged += (object sender, EventArgs e) => {
                switch (picker2.SelectedIndex)
                {
                case 0:
                {
                    autocomplete1.AutoCompleteMode = AutoCompleteMode.Append;
                    autocomplete2.AutoCompleteMode = AutoCompleteMode.Append;
                }
                break;

                case 1:
                {
                    autocomplete1.AutoCompleteMode = AutoCompleteMode.Suggest;
                    autocomplete2.AutoCompleteMode = AutoCompleteMode.Suggest;
                }
                break;

                case 2:
                {
                    autocomplete1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                    autocomplete2.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                }
                break;
                }
            };
            s1 = string.Empty;
            s2 = string.Empty;
            pp = new PickerExt();
            title.Add("Software");
            title.Add("Banking");
            title.Add("Media");
            title.Add("Medical");

            exp.Add("1");
            exp.Add("2");
            label5s = new Label();
            label1s = new Label()
            {
                Text = "Job Search", HeightRequest = 40, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label2s = new Label()
            {
                Text = "Country", HeightRequest = 30, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label3s = new Label()
            {
                Text = "Job Field", HeightRequest = 30, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label4s = new Label()
            {
                Text = "Experience", HeightRequest = 30, HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray
            };
            label1s.FontAttributes = FontAttributes.Bold;
            label1s.FontSize       = 24;
            label2s.FontAttributes = FontAttributes.None;
            label2s.FontSize       = 18;
            label3s.FontAttributes = FontAttributes.None;
            label3s.FontSize       = 18;
            label4s.FontAttributes = FontAttributes.None;
            label4s.FontSize       = 18;
            label5s.HeightRequest  = 10;
            label1s.TextColor      = Color.Black;
            label2s.TextColor      = Color.Black;
            label3s.TextColor      = Color.Black;
            label4s.TextColor      = Color.Black;
            label5s.TextColor      = Color.Black;
            buttons          = new Button();
            buttons.Text     = "Search";
            buttons.Clicked += (object sender, EventArgs e) => {
                if (s1 != "" && s2 != "")
                {
                    Random r = new Random();
                    DisplayAlert("Results", r.Next(9, 50) + " Jobs found", "OK");
                }
                else
                {
                    DisplayAlert("Results", "0 Jobs found", "OK");
                }
            };

            autocomplete1 = new SfAutoComplete();
            autocomplete1.SuggestionMode        = SuggestionMode.StartsWith;
            autocomplete1.AutoCompleteMode      = AutoCompleteMode.Suggest;
            autocomplete1.MaximumDropDownHeight = 300;
            autocomplete1.AutoCompleteSource    = new Countrylist().Country;
            autocomplete1.HeightRequest         = 40;
            autocomplete1.Watermark             = "Enter a country name";
            autocomplete1.ValueChanged         += (object sender, Syncfusion.SfAutoComplete.XForms.ValueChangedEventArgs e) =>
            {
                s1 = e.Value;
            };
            autocomplete2 = new SfAutoComplete();
            autocomplete2.SuggestionMode        = SuggestionMode.StartsWith;
            autocomplete2.AutoCompleteMode      = AutoCompleteMode.Suggest;
            autocomplete2.MaximumDropDownHeight = 300;
            autocomplete2.AutoCompleteSource    = title;
            autocomplete2.HeightRequest         = 40;
            autocomplete2.Watermark             = "Enter 'B' , 'S' , 'M' to start";
            autocomplete2.ValueChanged         += (object sender, Syncfusion.SfAutoComplete.XForms.ValueChangedEventArgs e) =>
            {
                s2 = e.Value;
            };
            pp.Items.Add("1");
            pp.Items.Add("2");
            pp.SelectedIndex   = 0;
            pp.BackgroundColor = Color.White;



            //this.BackgroundColor = Color.FromRgb(236, 235, 242);
            if (Device.OS == TargetPlatform.WinPhone)
            {
                autocomplete1.HeightRequest   = 80;
                autocomplete2.HeightRequest   = 80;
                this.BackgroundColor          = Color.Black;
                label1s.TextColor             = Color.White;
                label2s.TextColor             = Color.White;
                label3s.TextColor             = Color.White;
                label4s.TextColor             = Color.White;
                label5s.TextColor             = Color.White;
                autocomplete2.BackgroundColor = Color.White;
                autocomplete1.BackgroundColor = Color.White;
                pp.BackgroundColor            = Color.Black;
                text2.WidthRequest            = 120;
                text3.WidthRequest            = 120;
                text2.HeightRequest           = 80;
                text3.HeightRequest           = 80;
            }
            if (Device.OS == TargetPlatform.Windows)
            {
                this.BackgroundColor          = Color.Black;
                label1s.TextColor             = Color.Black;
                label2s.TextColor             = Color.Black;
                label3s.TextColor             = Color.Black;
                label4s.TextColor             = Color.Black;
                label5s.TextColor             = Color.Black;
                autocomplete2.BackgroundColor = Color.White;
                autocomplete1.BackgroundColor = Color.White;
                //pp.BackgroundColor = Color.Gray;
                text2.WidthRequest = 120;
                text3.WidthRequest = 120;
                if (Device.Idiom != TargetIdiom.Tablet)
                {
                    this.BackgroundColor = Color.Black;
                    label1s.TextColor    = Color.White;
                    label2s.TextColor    = Color.White;
                    label3s.TextColor    = Color.White;
                    label4s.TextColor    = Color.White;
                    label5s.TextColor    = Color.White;
                    pp.BackgroundColor   = Color.Black;
                }
            }


            this.ContentView = GetAutoComplete();
            PropertyView     = GetOptionPage();
        }
        public void getPropertiesWindow()
        {
            view = new StackLayout();
            view.BackgroundColor = Color.FromRgb(250, 250, 250);
            view.HeightRequest   = Property_Windows.HeightRequest;

            StackLayout propertyLayout = new StackLayout();

            propertyLayout.Orientation     = StackOrientation.Horizontal;
            propertyLayout.Padding         = new Thickness(10, 0, 0, 0);
            propertyLayout.BackgroundColor = Color.FromRgb(230, 230, 230);
            TapGestureRecognizer tab = new TapGestureRecognizer();

            tab.Tapped += tab_Tapped;
            propertyLayout.GestureRecognizers.Add(tab);
            Label propertyLabel = new Label();

            propertyLabel.Text              = "OPTIONS";
            propertyLabel.WidthRequest      = 150;
            propertyLabel.VerticalOptions   = LayoutOptions.Center;
            propertyLabel.HorizontalOptions = LayoutOptions.Start;
            propertyLabel.FontFamily        = "Helvetica";
            propertyLabel.FontSize          = 20;

            closeButton = new Button();

            if (Device.OS == TargetPlatform.iOS)
            {
                closeButton.Text      = "X";
                closeButton.TextColor = Color.FromRgb(51, 153, 255);
            }
            else
            {
                closeButton.Image = "sfclosebutton.png";
            }
            closeButton.Clicked += Close_Button;

            temp.BackgroundColor            = Color.FromRgb(230, 230, 230);
            closeButton.BackgroundColor     = Color.FromRgb(230, 230, 230);
            Property_Button.BackgroundColor = Color.FromRgb(230, 230, 230);

            closeButton.HorizontalOptions = LayoutOptions.EndAndExpand;
            propertyLayout.Children.Add(propertyLabel);
            propertyLayout.Children.Add(closeButton);

            StackLayout emptyLayout = new StackLayout();

            emptyLayout.Orientation     = StackOrientation.Vertical;
            emptyLayout.BackgroundColor = Color.FromRgb(250, 250, 250);
            emptyLayout.Padding         = new Thickness(40, 20, 40, 40);

            mainStack                   = new StackLayout();
            mainStack.Orientation       = StackOrientation.Horizontal;
            mainStack.HorizontalOptions = LayoutOptions.Center;

            localeLabel                   = new Label();
            localeLabel.Text              = "Locale";
            localeLabel.WidthRequest      = 150;
            localeLabel.VerticalOptions   = LayoutOptions.Center;
            localeLabel.HorizontalOptions = LayoutOptions.Start;
            localeLabel.FontFamily        = "Helvetica";
            localeLabel.FontSize          = 18;

            localePicker = new PickerExt();
            localePicker.HorizontalOptions = LayoutOptions.End;
            localePicker.VerticalOptions   = LayoutOptions.Center;
            localePicker.WidthRequest      = 150;
            localePicker.Items.Add("Chinese");
            localePicker.Items.Add("Spanish");
            localePicker.Items.Add("English");
            localePicker.Items.Add("French");
            localePicker.SelectedIndex         = local;
            localePicker.SelectedIndexChanged += localeLabel_SelectionIndexChanged;

            mainStack.Children.Add(localeLabel);
            mainStack.Children.Add(localePicker);
            emptyLayout.Children.Add(mainStack);

            view.Children.Add(propertyLayout);
            view.Children.Add(emptyLayout);

            Property_Windows.Children.Insert(0, view);
            Property_Windows.Children.Remove(temp);
        }
        public RangeSlider()
        {
            //InitializeComponent ();

            sfRangeSlider1 = new SfRangeSlider();
            sfRangeSlider2 = new SfRangeSlider();

            sfRangeSlider1.HeightRequest = 90;
            sfRangeSlider1.WidthRequest  = 200;
            sfRangeSlider1.Minimum       = 0;
            sfRangeSlider1.Maximum       = 12;
            sfRangeSlider1.RangeStart    = 0;
            sfRangeSlider1.RangeEnd      = 12;
            sfRangeSlider1.TickFrequency = 2;
            sfRangeSlider1.SnapsTo       = SnapsTo.None;
            sfRangeSlider1.Orientation   = Syncfusion.SfRangeSlider.XForms.Orientation.Horizontal;
            sfRangeSlider1.TickPlacement = TickPlacement.BottomRight;


            sfRangeSlider2.HeightRequest = 90;
            sfRangeSlider2.WidthRequest  = 200;
            sfRangeSlider2.Minimum       = 0;
            sfRangeSlider2.Maximum       = 12;
            sfRangeSlider2.RangeStart    = 0;
            sfRangeSlider2.RangeEnd      = 12;
            sfRangeSlider2.TickFrequency = 2;
            sfRangeSlider2.SnapsTo       = SnapsTo.None;
            sfRangeSlider2.Orientation   = Syncfusion.SfRangeSlider.XForms.Orientation.Horizontal;
            sfRangeSlider2.TickPlacement = TickPlacement.BottomRight;

            Title         = "Getting Started";
            toggleButton  = new Switch();
            toggleButton2 = new Switch();
            picker1       = new PickerExt();
            picker2       = new PickerExt();
            sfRangeSlider1.RangeChanging += (object sender, RangeEventArgs e) => {
                if (Math.Round(e.Start) < 1)
                {
                    if (Math.Round(e.End) == 12)
                    {
                        label10.Text = "12 AM - " + Math.Round(e.End) + " PM";
                    }
                    else
                    {
                        label10.Text = "12 AM - " + Math.Round(e.End) + " AM";
                    }
                }
                else
                {
                    if (Math.Round(e.End) == 12)
                    {
                        label10.Text = Math.Round(e.Start) + " AM - " + Math.Round(e.End) + " PM";
                    }
                    else
                    {
                        label10.Text = Math.Round(e.Start) + " AM - " + Math.Round(e.End) + " AM";
                    }
                }
                if (Math.Round(e.Start) == Math.Round(e.End))
                {
                    if (Math.Round(e.Start) < 1)
                    {
                        label10.Text = "12 AM";
                    }
                    else if (Math.Round(e.Start) == 12)
                    {
                        label10.Text = "12 PM";
                    }
                    else
                    {
                        label10.Text = Math.Round(e.Start) + " AM";
                    }
                }
            };
            sfRangeSlider2.RangeChanging += (object sender, RangeEventArgs e) =>
            {
                if (Math.Round(e.Start) < 1)
                {
                    if (Math.Round(e.End) == 12)
                    {
                        label11.Text = "12 AM - " + Math.Round(e.End) + " PM";
                    }
                    else
                    {
                        label11.Text = "12 AM - " + Math.Round(e.End) + " AM";
                    }
                }
                else
                {
                    if (Math.Round(e.End) == 12)
                    {
                        label11.Text = Math.Round(e.Start) + " AM - " + Math.Round(e.End) + " PM";
                    }
                    else
                    {
                        label11.Text = Math.Round(e.Start) + " AM - " + Math.Round(e.End) + " AM";
                    }
                }
                if (Math.Round(e.Start) == Math.Round(e.End))
                {
                    if (Math.Round(e.Start) < 1)
                    {
                        label11.Text = "12 AM";
                    }
                    else if (Math.Round(e.Start) == 12)
                    {
                        label11.Text = "12 PM";
                    }
                    else
                    {
                        label11.Text = Math.Round(e.Start) + " AM";
                    }
                }
            };
            toggleButton.Toggled  += toggleStateChanged;
            toggleButton2.Toggled += toggleStateChanged1;
            toggleButton.IsToggled = true;
            picker1.Items.Add("TopLeft");
            picker1.Items.Add("BottomRight");
            picker1.Items.Add("Inline");
            picker1.Items.Add("Outside");
            picker1.Items.Add("None");
            picker1.HeightRequest         = 40;
            picker1.SelectedIndex         = 1;
            picker1.SelectedIndexChanged += picker1_SelectedIndexChanged;
            picker2.Items.Add("TopLeft");
            picker2.Items.Add("BottomRight");
            picker2.HeightRequest         = 40;
            picker2.SelectedIndex         = 1;
            picker2.SelectedIndexChanged += picker2_SelectedIndexChanged;
            picker1.BackgroundColor       = Color.White;
            picker2.BackgroundColor       = Color.White;
            label6 = new Label()
            {
                Text          = " " + "Settings",
                FontSize      = 60,
                HeightRequest = 60,
                YAlign        = TextAlignment.End,
                TextColor     = Color.White
            };
            label3 = new Label()
            {
                Text          = "Tick Placement",
                HeightRequest = 20,
                YAlign        = TextAlignment.End,
                TextColor     = Color.Black
            };
            label4 = new Label()
            {
                Text          = "Label Placement",
                HeightRequest = 20,
                YAlign        = TextAlignment.End,
                TextColor     = Color.Black
            };
            label5 = new Label()
            {
                Text          = "Label",
                HeightRequest = 20,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.Black,
            };
            label9 = new Label()
            {
                Text          = "SnapsToTick",
                HeightRequest = 20,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.Black
            };
            if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
            {
                label9.TextColor = Color.White;
            }
            label10 = new Label()
            {
                FontSize      = 12,
                Text          = "12 AM - 12 PM",
                HeightRequest = 20,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.FromHex("#939394"),
                XAlign        = TextAlignment.Start
            };
            label11 = new Label()
            {
                FontSize      = 12,
                Text          = "12 AM - 12 PM",
                HeightRequest = 20,
                YAlign        = TextAlignment.Center,
                TextColor     = Color.FromHex("#939394"),
                XAlign        = TextAlignment.Start
            };
            if (Device.OS == TargetPlatform.Android)
            {
                time = new Label()
                {
                    FontSize      = 12,
                    Text          = "   Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                time1 = new Label()
                {
                    FontSize      = 12,
                    Text          = "   Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                label = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "  Departure",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
                label1 = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "  Arrival",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
            }
            else if (Device.OS == TargetPlatform.iOS)
            {
                time = new Label()
                {
                    FontSize      = 12,
                    Text          = "   Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                time1 = new Label()
                {
                    FontSize      = 12,
                    Text          = "   Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                label = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "  Departure",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
                label1 = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "  Arrival",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
            }
            else
            {
                time1 = new Label()
                {
                    FontSize      = 12,
                    Text          = "Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                time = new Label()
                {
                    FontSize      = 12,
                    Text          = "Time: ",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.Center,
                    TextColor     = Color.FromHex("#939394"),
                    XAlign        = TextAlignment.Start
                };
                label = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "Departure",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
                label1 = new Label()
                {
                    XAlign        = TextAlignment.Start,
                    Text          = "Arrival",
                    HeightRequest = 20,
                    YAlign        = TextAlignment.End,
                    TextColor     = Color.Black
                };
                if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
                {
                    label.TextColor  = Color.White;
                    label1.TextColor = Color.White;
                }
            }

            if (Device.OS == TargetPlatform.Android)
            {
                picker1.BackgroundColor = Color.FromRgb(239, 239, 239);
                picker2.BackgroundColor = Color.FromRgb(239, 239, 239);
                label3.FontSize         = 20;
                label4.FontSize         = 20;
                label5.FontSize         = 20;
                label9.FontSize         = 20;
            }
            label10.WidthRequest = sfRangeSlider1.Width;
            label11.WidthRequest = sfRangeSlider1.Width;
            label5.WidthRequest  = label9.Width;
            ContentView          = GetRangeSlider();
            PropertyView         = GetOptionPage();
        }
		private void DrawOptionsPage()
		{
			toggleButton = new Xamarin.Forms.Slider ();
			toggleButton.Value = 4;
			toggleButton2 = new Xamarin.Forms.Slider ();
			toggleButton2.Value = 2;
			toggleButton.Maximum = 20;
			toggleButton2.Maximum = 20;
			toggleButton2.ValueChanged+= (object sender, ValueChangedEventArgs e) => 
			{
				//groupGap = e.NewValue;
			};
			toggleButton.ValueChanged+= (object sender, ValueChangedEventArgs e) => {
				groupPadding = e.NewValue;
				(tree.Levels [0] as TreeMapFlatLevel).GroupPadding = groupPadding;
				tree.Refresh ();
			};
			picker1 = new PickerExt();
			picker2 = new PickerExt();
			picker1.Items.Add("Squarified");
			picker1.Items.Add("Slice And Dice Horizontal");
			picker1.Items.Add("Slice And Dice Vertical");
			picker1.Items.Add("Slice And Dice Auto");
			picker1.HeightRequest = 40;
			picker1.SelectedIndex = 0;
			picker1.SelectedIndexChanged += picker1_SelectedIndexChanged;


			picker2.Items.Add("RangeColorMapping");
			picker2.Items.Add("DesaturationColorMapping");
			picker2.Items.Add("UniColorMapping");
			picker2.Items.Add("PaletteColorMapping");
			picker2.HeightRequest = 40;
			picker2.SelectedIndex = 0;

			picker2.SelectedIndexChanged += picker2_SelectedIndexChanged;
			picker1.BackgroundColor = Color.White;
			picker2.BackgroundColor = Color.White;



			label6 = new Label()
			{
				Text = " " + "Settings",
				FontSize = 60,
				HeightRequest = 60,
				YAlign = TextAlignment.End,
				TextColor = Color.White
			};
			label3 = new Label()
			{
				Text = "Layout Type",
				HeightRequest = 20,
				YAlign = TextAlignment.End,
				TextColor = Color.Black
			};
			label4 = new Label()
			{
				Text = "Color Mapping",
				HeightRequest = 20,
				YAlign = TextAlignment.End,
				TextColor = Color.Black
			};
			label5 = new Label()
			{
				Text = "Group Padding",
				HeightRequest = 30,
				YAlign = TextAlignment.Center,
				TextColor = Color.Black,
			};
			label9 = new Label()
			{
				Text = "Group Gap",
				HeightRequest = 20,
				YAlign = TextAlignment.Center,
				TextColor = Color.Black
			};


			if (Device.OS == TargetPlatform.Android)
			{
				picker1.BackgroundColor = Color.FromRgb(239, 239, 239);
				picker2.BackgroundColor = Color.FromRgb(239, 239, 239);
				label3.FontSize = 20;
				label4.FontSize = 20;
				label5.FontSize = 20;
			}
			//label10.WidthRequest = tree.Width;
			//label11.WidthRequest = tree.Width;
			label5.WidthRequest = label9.Width;
			if (Device.OS == TargetPlatform.WinPhone)
			{

				label5.WidthRequest = 150;
				label9.WidthRequest = 150;

				picker1.HeightRequest = 60;
				picker2.HeightRequest = 60;

				label3.TextColor = Color.White;
				label4.TextColor = Color.White;
				label5.TextColor = Color.White;
				this.BackgroundColor = Color.Black;


				FileImageSource images = new FileImageSource();
				images.File = "options.png";
				baritem.Icon = images;
				label3.Text = "  " + "Layout Type";
				label3.HeightRequest = 22;
				label4.Text = "  " + "Color Mapping";
				label4.HeightRequest = 22;
				label5.Text = "  " + "Group Padding";
				label5.HeightRequest = 22;

				label9.TextColor = Color.White;

			}
            if (Device.OS == TargetPlatform.Windows && Device.Idiom != TargetIdiom.Tablet)
		    {
                picker1.BackgroundColor = Color.Gray;
                picker2.BackgroundColor = Color.Gray;
		    }
		}