public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            selectAll               = new SfCheckBox();
            selectAll.Frame         = new CGRect(50, 50, 200, 50);
            selectAll.StateChanged += SelectAll_StateChanged;
            selectAll.SetTitle("Select All", UIControlState.Normal);

            pepperoni               = new SfCheckBox();
            pepperoni.Frame         = new CGRect(50, 100, 200, 50);
            pepperoni.StateChanged += CheckBox_StateChanged;
            pepperoni.SetTitle("Pepperoni", UIControlState.Normal);

            beef               = new SfCheckBox();
            beef.Frame         = new CGRect(50, 150, 200, 50);
            beef.StateChanged += CheckBox_StateChanged;
            beef.SetTitle("Beef", UIControlState.Normal);
            beef.IsChecked = true;

            mushroom               = new SfCheckBox();
            mushroom.Frame         = new CGRect(50, 200, 200, 50);
            mushroom.StateChanged += CheckBox_StateChanged;
            mushroom.SetTitle("Mushrooms", UIControlState.Normal);

            onion               = new SfCheckBox();
            onion.Frame         = new CGRect(50, 250, 200, 50);
            onion.StateChanged += CheckBox_StateChanged;
            onion.SetTitle("Onions", UIControlState.Normal);
            onion.IsChecked = true;

            this.View.AddSubview(selectAll);
            this.View.AddSubview(pepperoni);
            this.View.AddSubview(beef);
            this.View.AddSubview(mushroom);
            this.View.AddSubview(onion);
        }
예제 #2
0
        public CheckBox_Mobile()
        {
            //Image
            image.Image = UIImage.FromBundle("Images/Pizzaimage.png");
            AddSubview(image);

            //Main statck
            mainStackView.Axis = UILayoutConstraintAxis.Vertical;

            //Layer
            layer.BorderWidth  = 1.5f;
            layer.BorderColor  = UIColor.FromRGB(205, 205, 205).CGColor;
            layer.CornerRadius = 10;
            Layer.AddSublayer(layer);

            //heading
            hedinglbl.Text      = "Add Extra Toppings";
            hedinglbl.TextColor = UIColor.FromRGB(0, 125, 230);
            hedinglbl.Font      = UIFont.FromName(hedinglbl.Font.FamilyName, 20);
            mainStackView.AddSubview(hedinglbl);

            //Select All
            selectAll.SetTitle("Select All", UIControlState.Normal);
            selectAll.SetTitleColor(UIColor.Black, UIControlState.Normal);
            selectAll.StateChanged += SelectAll_StateChanged;
            mainStackView.AddSubview(selectAll);

            //GrilledChicken
            grilledChicken.SetTitle("Grilled Chicken", UIControlState.Normal);
            grilledChicken.SetTitleColor(UIColor.Black, UIControlState.Normal);
            grilledChicken.StateChanged += Toppings_StateChanged;
            mainStackView.AddSubview(grilledChicken);

            //ChickenTikka
            chickenTikka.SetTitle("Chicken Tikka", UIControlState.Normal);
            chickenTikka.SetTitleColor(UIColor.Black, UIControlState.Normal);
            chickenTikka.StateChanged += Toppings_StateChanged;
            mainStackView.AddSubview(chickenTikka);

            //ChickenSausage
            chickenSausage.SetTitle("Chicken Sausage", UIControlState.Normal);
            chickenSausage.SetTitleColor(UIColor.Black, UIControlState.Normal);
            chickenSausage.StateChanged += Toppings_StateChanged;
            mainStackView.AddSubview(chickenSausage);

            //Beef
            beef.SetTitle("Beef", UIControlState.Normal);
            beef.SetTitleColor(UIColor.Black, UIControlState.Normal);
            beef.StateChanged += Toppings_StateChanged;
            mainStackView.AddSubview(beef);

            //Button
            button.SetTitle("Order Now", UIControlState.Normal);
            button.SetTitleColor(UIColor.LightGray, UIControlState.Disabled);
            button.SetTitleColor(UIColor.White, UIControlState.Normal);
            button.BackgroundColor = UIColor.FromRGB(0, 125, 230);
            button.TouchDown      += Button_Clicked;
            button.Enabled         = false;
            AddSubview(button);

            //Alert
            alertView.Message = "Your order has been placed successfully !";

            alertView.AddButton("OK");

            AddSubview(mainStackView);
        }
예제 #3
0
        void LoadAllowedTextsLabel()
        {
            #region Description Label
            label.Frame         = frameRect;
            label.TextColor     = UIColor.FromRGB(38 / 255.0f, 38 / 255.0f, 38 / 255.0f);
            label.Text          = "This sample illustrates the conversion of a Excel document to PDF.";
            label.Font          = UIFont.SystemFontOfSize(15);
            label.Lines         = 0;
            label.LineBreakMode = UILineBreakMode.WordWrap;
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                label.Font  = UIFont.SystemFontOfSize(18);
                label.Frame = new CGRect(5, 5, frameRect.Location.X + frameRect.Size.Width, 35);
            }
            else
            {
                label.Frame = new CGRect(5, 5, frameRect.Location.X + frameRect.Size.Width, 50);
            }
            #endregion

            #region Page Setup Options Label
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                pageSetuplabel.Font  = UIFont.SystemFontOfSize(18);
                pageSetuplabel.Frame = new CGRect(10, 45, frameRect.Location.X + frameRect.Size.Width - 20, 50);
                layoutButton.Frame   = new CGRect(10, 95, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }
            else
            {
                pageSetuplabel.Frame = new CGRect(10, 50, frameRect.Location.X + frameRect.Size.Width - 20, 50);
                layoutButton.Frame   = new CGRect(10, 100, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }

            //filter Label
            pageSetuplabel.TextColor       = UIColor.Black;
            pageSetuplabel.BackgroundColor = UIColor.Clear;
            pageSetuplabel.Text            = "Page Setup Options :";
            pageSetuplabel.TextAlignment   = UITextAlignment.Left;
            pageSetuplabel.Font            = UIFont.FromName("Helvetica", 16f);

            //filter button
            layoutButton.SetTitle("NoScaling", UIControlState.Normal);
            layoutButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
            layoutButton.BackgroundColor     = UIColor.Clear;
            layoutButton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            layoutButton.Hidden             = false;
            layoutButton.Layer.BorderColor  = UIColor.FromRGB(246, 246, 246).CGColor;
            layoutButton.Layer.BorderWidth  = 4;
            layoutButton.Layer.CornerRadius = 8;
            layoutButton.Font           = UIFont.FromName("Helvetica", 16f);
            layoutButton.TouchUpInside += ShowFilterPicker;

            #endregion

            #region Layout Picker

            //filterpicker
            PickerModel filterPickermodel = new PickerModel(this.layoutList);
            filterPickermodel.PickerChanged += (sender, e) =>
            {
                this.selectedLayout = e.SelectedValue;
                layoutButton.SetTitle(selectedLayout, UIControlState.Normal);
            };

            layoutPicker.ShowSelectionIndicator = true;
            layoutPicker.Hidden          = true;
            layoutPicker.Model           = filterPickermodel;
            layoutPicker.BackgroundColor = UIColor.White;

            layoutDoneButton.SetTitle("Done\t", UIControlState.Normal);
            layoutDoneButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Right;
            layoutDoneButton.BackgroundColor     = UIColor.FromRGB(240, 240, 240);
            layoutDoneButton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            layoutDoneButton.Hidden         = true;
            layoutDoneButton.TouchUpInside += HideFilterPicker;

            layoutPicker.Frame     = new CGRect(0, this.Frame.Size.Height / 4 + 20, this.Frame.Size.Width, this.Frame.Size.Height / 3);
            layoutDoneButton.Frame = new CGRect(0, this.Frame.Size.Height / 4 - 20, this.Frame.Size.Width, 40);

            #endregion
            ////UI Substitute button
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                SubstituteLabel.Font  = UIFont.SystemFontOfSize(16);
                SubstituteLabel.Frame = new CGRect(10, 170, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }
            else
            {
                SubstituteLabel.Frame = new CGRect(10, 175, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }

            //filter Label
            SubstituteLabel.TextColor       = UIColor.Black;
            SubstituteLabel.BackgroundColor = UIColor.Clear;
            SubstituteLabel.Text            = "Substitute Fonts:";
            SubstituteLabel.TextAlignment   = UITextAlignment.Left;
            SubstituteLabel.Font            = UIFont.FromName("Helvetica", 16f);

            ///UI CheckBox
            checkfontName.SetTitle("Font Name", UIControlState.Normal);
            checkfontName.SetTitleColor(UIColor.Black, UIControlState.Normal);
            checkfontName.Frame = new CGRect(10, 205, frameRect.Location.X + frameRect.Size.Width - 20, 50);

            ////UI Font Name
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                FontNameLabel.Font  = UIFont.SystemFontOfSize(18);
                FontNameLabel.Frame = new CGRect(10, 225, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }
            else
            {
                FontNameLabel.Frame = new CGRect(10, 230, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }

            //filter Label
            FontNameLabel.TextColor       = UIColor.Black;
            FontNameLabel.BackgroundColor = UIColor.Clear;
            FontNameLabel.Text            = "Missing fonts in the device will be substituted to Calibri.";
            FontNameLabel.TextAlignment   = UITextAlignment.Left;
            FontNameLabel.Font            = UIFont.FromName("Helvetica", 9f);

            ///UI CheckBox
            checkfontStream.SetTitle("Font stream", UIControlState.Normal);
            checkfontStream.SetTitleColor(UIColor.Black, UIControlState.Normal);
            checkfontStream.Frame = new CGRect(10, 255, frameRect.Location.X + frameRect.Size.Width - 20, 50);

            ////UI Font Stream
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                FontStreamLabel.Font  = UIFont.SystemFontOfSize(18);
                FontStreamLabel.Frame = new CGRect(10, 270, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }
            else
            {
                FontStreamLabel.Frame = new CGRect(10, 275, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }

            //filter Label
            FontStreamLabel.TextColor       = UIColor.Black;
            FontStreamLabel.BackgroundColor = UIColor.Clear;
            FontStreamLabel.Text            = "Missing fonts in the device will be substituted from embedded resource.";
            FontStreamLabel.TextAlignment   = UITextAlignment.Left;
            FontStreamLabel.Font            = UIFont.FromName("Helvetica", 9f);

            #region Input Template Button
            //button
            inputButton.SetTitle("Input Template", UIControlState.Normal);
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                inputButton.Frame = new CGRect(0, 320, frameRect.Location.X + frameRect.Size.Width, 10);
            }
            else
            {
                inputButton.Frame = new CGRect(0, 325, frameRect.Location.X + frameRect.Size.Width, 10);
            }

            #endregion

            #region Convert Button
            convertButton.SetTitle("Convert", UIControlState.Normal);
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                convertButton.Frame = new CGRect(0, 345, frameRect.Location.X + frameRect.Size.Width, 10);
            }
            else
            {
                convertButton.Frame = new CGRect(0, 350, frameRect.Location.X + frameRect.Size.Width, 10);
            }

            #endregion
        }
예제 #4
0
        void LoadAllowedTextsLabel()
        {
            label.Frame     = frameRect;
            label.TextColor = UIColor.FromRGB(38 / 255.0f, 38 / 255.0f, 38 / 255.0f);
            label.Text      = "This sample demonstrates the performance of Syncfusion XlsIO library to create larger Excel files.";
            label.Font      = UIFont.SystemFontOfSize(15);
            label.Lines     = 0;
            label.SizeToFit();
            label.LineBreakMode = UILineBreakMode.WordWrap;
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                label.Font  = UIFont.SystemFontOfSize(18);
                label.Frame = new CGRect(5, 5, frameRect.Location.X + frameRect.Size.Width, 50);
            }
            else
            {
                label.Frame = new CGRect(5, 5, frameRect.Size.Width, 70);
            }
            this.AddSubview(label);

            label2.Frame = new CGRect(10, 80, 300, 17);
            label2.Text  = "Enter the no. of rows";
            label2.Font  = UIFont.SystemFontOfSize(14);
            label2.Lines = 0;
            label2.SizeToFit();
            label2.LineBreakMode = UILineBreakMode.WordWrap;
            this.AddSubview(label2);

            textBox1.Value = 5000;
            textBox1.Frame = new CGRect(10, 100, 250, 20);
            this.AddSubview(textBox1);

            label3.Frame = new CGRect(10, 130, 300, 17);
            label3.Text  = "Enter the no. of columns";
            label3.Font  = UIFont.SystemFontOfSize(14);
            label3.Lines = 0;
            label3.SizeToFit();
            label3.LineBreakMode = UILineBreakMode.WordWrap;
            this.AddSubview(label3);


            textBox2.Value = 50;
            textBox2.Frame = new CGRect(10, 150, 250, 20);
            this.AddSubview(textBox2);

            importCheck.Frame        = new CGRect(10, 180, 200, 20);
            importCheck.Font         = UIFont.SystemFontOfSize(14);
            importCheck.CornerRadius = 5.0f;
            importCheck.SetTitle("Import on Save", UIControlState.Normal);

            this.AddSubview(importCheck);

            label1.Frame = new CGRect(10, 210, 300, 17);
            label1.Text  = "Import on Save option directly serialize data while saving the workbook.";
            label1.Font  = UIFont.SystemFontOfSize(12);
            label1.Lines = 0;
            label1.SizeToFit();
            label1.LineBreakMode = UILineBreakMode.WordWrap;
            this.AddSubview(label1);


            button.SetTitle("Generate Excel", UIControlState.Normal);
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                button.Frame = new CGRect(0, 240, frameRect.Location.X + frameRect.Size.Width, 10);
            }
            else
            {
                button.Frame = new CGRect(5, 255, frameRect.Size.Width, 10);
            }
            this.AddSubview(button);
        }
예제 #5
0
        void LoadAllowedTextsLabel()
        {
            #region Description Label
            label.Frame         = frameRect;
            label.TextColor     = UIColor.FromRGB(38 / 255.0f, 38 / 255.0f, 38 / 255.0f);
            label.Text          = "This sample illustrates the conversion of Excel documents to JSON file.";
            label.Font          = UIFont.SystemFontOfSize(15);
            label.Lines         = 0;
            label.LineBreakMode = UILineBreakMode.WordWrap;
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                label.Font  = UIFont.SystemFontOfSize(18);
                label.Frame = new CGRect(5, 5, frameRect.Location.X + frameRect.Size.Width, 35);
            }
            else
            {
                label.Frame = new CGRect(5, 5, frameRect.Location.X + frameRect.Size.Width, 50);
            }
            #endregion

            #region Page Setup Options Label
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                pageSetuplabel.Font  = UIFont.SystemFontOfSize(18);
                pageSetuplabel.Frame = new CGRect(10, 45, frameRect.Location.X + frameRect.Size.Width - 20, 50);
                layoutButton.Frame   = new CGRect(10, 95, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }
            else
            {
                pageSetuplabel.Frame = new CGRect(10, 50, frameRect.Location.X + frameRect.Size.Width - 20, 50);
                layoutButton.Frame   = new CGRect(10, 100, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            }

            //filter Label
            pageSetuplabel.TextColor       = UIColor.Black;
            pageSetuplabel.BackgroundColor = UIColor.Clear;
            pageSetuplabel.Text            = "Convert :";
            pageSetuplabel.TextAlignment   = UITextAlignment.Left;
            pageSetuplabel.Font            = UIFont.FromName("Helvetica", 16f);

            //filter button
            layoutButton.SetTitle("Workbook", UIControlState.Normal);
            layoutButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Center;
            layoutButton.BackgroundColor     = UIColor.Clear;
            layoutButton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            layoutButton.Hidden             = false;
            layoutButton.Layer.BorderColor  = UIColor.FromRGB(246, 246, 246).CGColor;
            layoutButton.Layer.BorderWidth  = 4;
            layoutButton.Layer.CornerRadius = 8;
            layoutButton.Font           = UIFont.FromName("Helvetica", 16f);
            layoutButton.TouchUpInside += ShowFilterPicker;

            #endregion

            #region Layout Picker

            //filterpicker
            PickerModel filterPickermodel = new PickerModel(this.layoutList);
            filterPickermodel.PickerChanged += (sender, e) =>
            {
                this.selectedLayout = e.SelectedValue;
                layoutButton.SetTitle(selectedLayout, UIControlState.Normal);
            };

            layoutPicker.ShowSelectionIndicator = true;
            layoutPicker.Hidden          = true;
            layoutPicker.Model           = filterPickermodel;
            layoutPicker.BackgroundColor = UIColor.White;

            layoutDoneButton.SetTitle("Done\t", UIControlState.Normal);
            layoutDoneButton.HorizontalAlignment = UIControlContentHorizontalAlignment.Right;
            layoutDoneButton.BackgroundColor     = UIColor.FromRGB(240, 240, 240);
            layoutDoneButton.SetTitleColor(UIColor.Black, UIControlState.Normal);
            layoutDoneButton.Hidden         = true;
            layoutDoneButton.TouchUpInside += HideFilterPicker;

            layoutPicker.Frame     = new CGRect(0, this.Frame.Size.Height / 4 + 20, this.Frame.Size.Width, this.Frame.Size.Height / 3);
            layoutDoneButton.Frame = new CGRect(0, this.Frame.Size.Height / 4 - 20, this.Frame.Size.Width, 40);

            #endregion

            ///UI CheckBox
            checkSchema.SetTitle("As Schema", UIControlState.Normal);
            checkSchema.SetTitleColor(UIColor.Black, UIControlState.Normal);
            checkSchema.Frame     = new CGRect(10, 155, frameRect.Location.X + frameRect.Size.Width - 20, 50);
            checkSchema.IsChecked = true;

            #region Input Template Button
            //button
            inputButton.SetTitle("Input Template", UIControlState.Normal);
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                inputButton.Frame = new CGRect(0, 215, frameRect.Location.X + frameRect.Size.Width, 10);
            }
            else
            {
                inputButton.Frame = new CGRect(0, 220, frameRect.Location.X + frameRect.Size.Width, 10);
            }

            #endregion

            #region Convert Button
            convertButton.SetTitle("Convert", UIControlState.Normal);
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                convertButton.Frame = new CGRect(0, 245, frameRect.Location.X + frameRect.Size.Width, 10);
            }
            else
            {
                convertButton.Frame = new CGRect(0, 250, frameRect.Location.X + frameRect.Size.Width, 10);
            }

            #endregion
        }