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 }
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); }
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 }