当前位置: 首页>>代码示例>>C#>>正文


C# UIScrollView.Add方法代码示例

本文整理汇总了C#中UIScrollView.Add方法的典型用法代码示例。如果您正苦于以下问题:C# UIScrollView.Add方法的具体用法?C# UIScrollView.Add怎么用?C# UIScrollView.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIScrollView的用法示例。


在下文中一共展示了UIScrollView.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ViewDidLoad

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

			scrollView = new UIScrollView {
				BackgroundColor = UIColor.Black,
				Frame = new CGRect (0, 0, 320, View.Bounds.Height * 3)
			};

			hamburgerMenu = new UIButton {
				Frame = new CGRect (10, 10, 25, 25)
			};
			hamburgerMenu.SetImage (UIImage.FromFile ("HamburgerMenu.png"), UIControlState.Normal);
			hamburgerMenu.TouchUpInside += (sender, e) => {
				flyout.ToggleMenu ();
			};

			photoGalleryView = new PhotoGalleryView (View.Bounds) {
				Frame = new CGRect (0, 0, View.Bounds.Width, View.Bounds.Height)
			};

			scrollView.Add (photoGalleryView);
			scrollView.Add (hamburgerMenu);

			View.Add (scrollView);
		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:26,代码来源:PhotoGalleryViewController.cs

示例2: SetupUserInterface

		private void SetupUserInterface ()
		{
			scrollView = new UIScrollView {
				BackgroundColor = UIColor.Clear.FromHexString ("#336699", 1.0f),
				Frame = new CGRect (0, 0, Frame.Width, Frame.Height)
			};

			licensureLabel = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 30f),
				Frame = new CGRect (0, 20, Frame.Width, 35),
				Text = "Terms of Service",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			textView = new UITextView {
				BackgroundColor = UIColor.Clear,
				Font = UIFont.FromName ("SegoeUI-Light", 15f), 
				Frame = new CGRect (20, 50, Frame.Width - 40, Frame.Height * 1.75),
				Text = "Willie’s Cycle will assume no damage liability from the sales of used or new parts. This damage includes personal injury, property, vehicle, monetary, punitive, emotional, and mental damage. All risk and liability is assumed by the purchaser or the installer of any product sold by Willie’s Cycle. Willie’s Cycle cannot be held liable for any of the following reasons: damage to person or property, including damage or injury to driver, passenger, or any other person, animal or property damage that may occur have occurred after purchasing any product from Willie’s Cycle. Willie’s Cycle will only accept returns for parts to be used in store credit or, at our discretion. Willie’s Cycle will give refunds due to applications not being as described. Willie’s Cycle will only give credit or refund up to full purchase amount of the product. Willie’s Cycle may charge a restock fee for returned parts. This restock fee is a minimum of 20% of the purchase price. All parts are expected to have normal wear, and in no way do we consider used parts to be in any condition other than used functional parts with wear, unless otherwise noted. Any returns must be sent with return authorization. RA# may be granted by providing the following: Date of purchase, transaction number, year, model, make, and VIN number of vehicle. Returns can be rejected if purchase was made on account of buyer error. Amount of refund or credit is determined solely by Willie’s Cycle. Returned item must be received by Willie’s Cycle within 30 days of original purchase date. All returned items must be returned in the same condition as they were received.",
				TextColor = UIColor.White,
				UserInteractionEnabled = false
			};

			scrollView.ContentSize = new CGSize (Frame.Width, Frame.Height * 1.75);

			scrollView.Add (licensureLabel);
			scrollView.Add (textView);
			Add (scrollView);
		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:30,代码来源:DisclaimerView.cs

示例3: SetupUserInterface

		private void SetupUserInterface ()
		{
			scrollView = new UIScrollView {
				BackgroundColor = UIColor.Clear.FromHexString ("#094074", 1.0f),
				Frame = new CGRect (0, 0, Frame.Width, Frame.Height * 2)
			};

			licensureLabel = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 25f),
				Frame = new CGRect (0, 20, Frame.Width, 35),
				Text = "Open-Source",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			string localHtmlUrl = Path.Combine (NSBundle.MainBundle.BundlePath, "Licensure.html");
			var url = new NSUrl (localHtmlUrl, false);
			var request = new NSUrlRequest (url);

			webView = new UIWebView () {
				Frame = new CGRect (0, 55, Frame.Width, Frame.Height - 55)
			};
			webView.LoadRequest (request);

			scrollView.ContentSize = new CGSize (Frame.Width, Frame.Height * 2);

			scrollView.Add (licensureLabel);
			scrollView.Add (webView);
			Add (scrollView);
		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:30,代码来源:LicensureView.cs

示例4: LoadView

		public override void LoadView ()
		{
			base.LoadView ();
			View.AddSubview (scrollView = new UIScrollView (View.Bounds));
			if (ShouldShowInstructions) {
				scrollView.Add (ContentView = new PrefillXamarinAccountInstructionsView ());
			} else {
				LoginView = new LoginView (XamarinAccountEmail);
				LoginView.UserDidLogin += _ => Login (XamarinAccountEmail, LoginView.PasswordField.Text);
				scrollView.Add (ContentView = LoginView);
			}
		}
开发者ID:AsiyaLearn,项目名称:xamarin-store-app,代码行数:12,代码来源:LoginViewController.cs

示例5: InitializeComponent

        private void InitializeComponent()
        {
            View.BackgroundColor = Application.Colors.MainBackgroundColor;

            FlowerImage = new UIImageView(new CGRect(10, 75, 120, 120));
            View.Add(FlowerImage);

            NameText = new UILabel(new CGRect(140, 75, 170, 30))
            {
                TextColor = Application.Colors.HighlightColor,
                Font = Application.Fonts.TitleFont,
                LineBreakMode = UILineBreakMode.WordWrap,
                Lines = 0,
            };
            View.Add(NameText);

            Scroll = new UIScrollView(new CGRect(10, 205, 300, 265));
            View.Add(Scroll);

            DescriptionText = new UILabel(new CGRect(0, 0, 300, 235))
            {
                LineBreakMode = UILineBreakMode.WordWrap,
                Lines = 0,
            };
            Scroll.Add(DescriptionText);

            SeeCommentButton = new UIBarButtonItem(
                "Comments",
                UIBarButtonItemStyle.Plain,
                null);

            NavigationItem.SetRightBarButtonItem(SeeCommentButton, false);
        }
开发者ID:NulledLabs,项目名称:mvvmlight,代码行数:33,代码来源:DetailsViewController.ui.cs

示例6: SetupUserInterface

		private void SetupUserInterface ()
		{
			scrollView = new UIScrollView {
				BackgroundColor = UIColor.Clear.FromHexString ("#FAC05E", 1.0f),
				Frame = new CGRect (0, 0, Frame.Width, Frame.Height * 2)
			};

			photoGallery = new UILabel {
				Font = UIFont.FromName ("SegoeUI-Light", 30f),
				Frame = new CGRect (0, 10, Frame.Width, 35),
				Text = "Photo Gallery",
				TextAlignment = UITextAlignment.Center,
				TextColor = UIColor.White
			};

			imageViewOne = new UIImageView {
				Frame = new CGRect ((Bounds.Width - 256) / 2, 55, 256, 192),
				Image = UIImage.FromFile ("ImageTwo.jpg")
			};

			imageViewTwo = new UIImageView {
				Frame = new CGRect ((Bounds.Width - 256) / 2, 255, 256, 192),
				Image = UIImage.FromFile ("ImageThree.jpg")
			};

			imageViewThree = new UIImageView {
				Frame = new CGRect ((Bounds.Width - 256) / 2, 455, 256, 192),
				Image = UIImage.FromFile ("ImageOne.jpg")
			};

			scrollView.Add (photoGallery);
			scrollView.Add (imageViewOne);
			scrollView.Add (imageViewTwo);
			scrollView.Add (imageViewThree);

			Add (scrollView);
		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:37,代码来源:PhotoGalleryView.cs

示例7: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
			
            _rootViewController = UIApplication.SharedApplication.KeyWindow.RootViewController;

            scrollView = new UIScrollView(_windowBounds)
            {
                BackgroundColor = UIColor.Clear,
                Bounces = false,
                ShowsVerticalScrollIndicator = false,
                ShowsHorizontalScrollIndicator = false
            };
            
            blackMask.Add(scrollView);
            blackMask.BringSubviewToFront(btnDone);

            scrollView.Add(_imageView);
            scrollView.UserInteractionEnabled = true;
            scrollView.MultipleTouchEnabled = true;

            scrollView.DidZoom += (object sender, EventArgs e) =>
            {
                if (btnDone.Layer.Opacity == 1 && scrollView.ZoomScale > 1)
                {
                    HideDoneButton();
                }
                else if (scrollView.ZoomScale == 1 && btnDone.Layer.Opacity == 0)
                {
                    ShowDoneButton();
                }

                CenterScrollViewContents();
            };
            
            scrollView.ZoomingEnded += (object sender, ZoomingEndedEventArgs e) =>
            {
                _isAnimating = false;
            };
            scrollView.ViewForZoomingInScrollView += (UIScrollView sv) =>
            {
                return _imageView;
            };

            AddPanGestureToView(_imageView);
            AddMultipleGesture();

            btnDone.ImageEdgeInsets = new UIEdgeInsets(20, 20, 10, 10);
        }
开发者ID:anhvule,项目名称:MHFacebookImageViewer.Xamarin,代码行数:49,代码来源:ImageViewer.cs

示例8: FinishedLaunching

        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.BackgroundColor = UIColor.White;

            // Create and add subviews
            CGRect screenRect = new CGRect(window.Bounds.Location.X, window.Bounds.Location.Y,window.Bounds.Size.Width,window.Bounds.Size.Height);
            UIScrollView scrollView = new UIScrollView(screenRect);

            view = new HypnosisView(scrollView.Bounds);
            //view.Frame = new RectangleF(window.Bounds.Location.X, window.Bounds.Location.Y+23,window.Bounds.Size.Width,window.Bounds.Size.Height-23);
            //view.Frame = new RectangleF(window.Bounds.Location, window.Bounds.Size);
            //view.Frame = new RectangleF(window.Frame.Location, window.Frame.Size);
            scrollView.Add(view);

            BNRLogo logoView = new BNRLogo(new CGRect(0, 0, 100, 100));
            view.Add(logoView);

            CGSize svSize = scrollView.Bounds.Size;
            scrollView.ContentSize = svSize;
            scrollView.MinimumZoomScale = 1;
            scrollView.MaximumZoomScale = 5;
            //scrollView.PagingEnabled = true;

            scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => {return view;};

            bool success = view.BecomeFirstResponder();
            if (success) {
                Console.WriteLine("HypnosisView became the first responder");
            } else {
                Console.WriteLine("HypnosisView could not become the first responder");
            }

            // If you have defined a root view controller, set it here:
            viewController = new HypnosisViewController();
            viewController.View = scrollView;
            window.RootViewController = viewController;

            // make the window visible
            window.MakeKeyAndVisible();

            return true;
        }
开发者ID:yingfangdu,项目名称:BNR,代码行数:51,代码来源:AppDelegate.cs

示例9: ViewDidLoad

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

			Title = "Terms of Service";

			scrollView = new UIScrollView {
				BackgroundColor = UIColor.Black,
				Frame = new CGRect (0, 0, 320, View.Bounds.Height * 3)
			};

			disclaimerView = new DisclaimerView (View.Bounds) {
				Frame = new CGRect (0, 0, View.Bounds.Width, View.Bounds.Height)
			};

			scrollView.Add (disclaimerView);

			View.Add (scrollView);
		}
开发者ID:Cmaster14,项目名称:WilliesCycleApps,代码行数:19,代码来源:InlineDisclaimerViewController.cs

示例10: ScrollingToolbarView

        public ScrollingToolbarView(CGRect rect, IEnumerable<UIButton> buttons)
            : base(rect)
        {
            _buttons = buttons;
            this.AutosizesSubviews = true;
            _scrollView = new UIScrollView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height));
            _scrollView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            _scrollView.UserInteractionEnabled = true;
            _scrollView.ExclusiveTouch = true;
            _scrollView.CanCancelContentTouches = true;
            _scrollView.DelaysContentTouches = true;
            _scrollView.ShowsHorizontalScrollIndicator = false;
            _scrollView.ShowsVerticalScrollIndicator = false;

            var line = new UIView(new CGRect(0, 0, rect.Width, 0.5f));
            line.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin;
            line.BackgroundColor = UIColor.DarkGray;
            Add(line);

            foreach (var button in buttons)
                _scrollView.Add(button);

            Add(_scrollView);
        }
开发者ID:xNUTs,项目名称:CodeBucket,代码行数:24,代码来源:ScrollingToolbarView.cs

示例11: LoadView

        public override void LoadView ()
        {
            var scrollView = new UIScrollView ().Apply (Style.Screen);

            scrollView.Add (wrapper = new UIView () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            });

            wrapper.Add (startStopView = new StartStopView () {
                TranslatesAutoresizingMaskIntoConstraints = false,
                StartTime = model.StartTime,
                StopTime = model.StopTime,
            }.Apply (BindStartStopView));
            startStopView.SelectedChanged += OnStartStopViewSelectedChanged;

            wrapper.Add (datePicker = new UIDatePicker () {
                TranslatesAutoresizingMaskIntoConstraints = false,
                Hidden = DatePickerHidden,
                Alpha = 0,
            }.Apply (Style.EditTimeEntry.DatePicker).Apply (BindDatePicker));
            datePicker.ValueChanged += OnDatePickerValueChanged;

            wrapper.Add (projectButton = new ProjectClientTaskButton () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (BindProjectButton));
            projectButton.TouchUpInside += OnProjectButtonTouchUpInside;

            wrapper.Add (descriptionTextField = new TextField () {
                TranslatesAutoresizingMaskIntoConstraints = false,
                AttributedPlaceholder = new NSAttributedString (
                    "EditEntryDesciptionTimerHint".Tr (),
                    foregroundColor: Color.Gray
                ),
                ShouldReturn = (tf) => tf.ResignFirstResponder (),
            }.Apply (Style.EditTimeEntry.DescriptionField).Apply (BindDescriptionField));
            descriptionTextField.EditingChanged += OnDescriptionFieldEditingChanged;
            descriptionTextField.EditingDidEnd += (s, e) => CommitDescriptionChanges ();

            wrapper.Add (tagsButton = new UIButton () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.EditTimeEntry.TagsButton).Apply (BindTagsButton));
            tagsButton.TouchUpInside += OnTagsButtonTouchUpInside;

            wrapper.Add (billableSwitch = new LabelSwitchView () {
                TranslatesAutoresizingMaskIntoConstraints = false,
                Text = "EditEntryBillable".Tr (),
            }.Apply (Style.EditTimeEntry.BillableContainer).Apply (BindBillableSwitch));
            billableSwitch.Label.Apply (Style.EditTimeEntry.BillableLabel);
            billableSwitch.Switch.ValueChanged += OnBillableSwitchValueChanged;

            wrapper.Add (deleteButton = new UIButton () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.EditTimeEntry.DeleteButton));
            deleteButton.SetTitle ("EditEntryDelete".Tr (), UIControlState.Normal);
            deleteButton.TouchUpInside += OnDeleteButtonTouchUpInside;

            wrapper.AddConstraints (VerticalLinearLayout (wrapper));
            scrollView.AddConstraints (
                wrapper.AtTopOf (scrollView),
                wrapper.AtBottomOf (scrollView),
                wrapper.AtLeftOf (scrollView),
                wrapper.AtRightOf (scrollView),
                wrapper.WithSameWidth (scrollView),
                wrapper.Height ().GreaterThanOrEqualTo ().HeightOf (scrollView).Minus (64f),
                null
            );

            View = scrollView;
        }
开发者ID:nagyist,项目名称:toggl-mobile,代码行数:69,代码来源:EditTimeEntryViewController.cs

示例12: KeyboardInputView

		public KeyboardInputView (RectangleF frame)
			: base(frame)
		{
			_toolbar = new UIToolbar (frame);

			var toolbarItems = new UIBarButtonItem[] {
				new UIBarButtonItem (UIBarButtonSystemItem.Cancel, CancelButton_Tapped),
				new UIBarButtonItem (UIBarButtonSystemItem.FlexibleSpace, null),
				new UIBarButtonItem (UIBarButtonSystemItem.Done, DoneButton_Tapped)
			};

			_toolbar.SetItems (toolbarItems, false);
			_toolbar.SizeToFit ();

			_title = new UILabel (RectangleF.Empty);
			_title.Font = UIFont.SystemFontOfSize (UIFont.LabelFontSize * 1.2f);
			_title.BackgroundColor = UIColor.Clear;
			_title.LineBreakMode = UILineBreakMode.TailTruncation;
			_title.Lines = 2;

			_description = new UILabel (RectangleF.Empty);
			_description.Font = UIFont.SystemFontOfSize (UIFont.LabelFontSize);
			_description.TextColor = UIColor.DarkTextColor.ColorWithAlpha (0.95f);
			_description.BackgroundColor = UIColor.Clear;
			_title.LineBreakMode = UILineBreakMode.TailTruncation;
			_description.Lines = 2;

			_textFieldContainer = new UIScrollView(new RectangleF(0, 0, 100, 100));

			_textField = new UITextField (_textFieldContainer.Bounds);
			_textField.AutoresizingMask =
				UIViewAutoresizing.FlexibleWidth |
				UIViewAutoresizing.FlexibleHeight;
			_textField.BorderStyle = UITextBorderStyle.RoundedRect;
			_textField.Delegate = new TextFieldDelegate (this);

			_textFieldContainer.Add (_textField);

			Add (_toolbar);
			Add (_title);
			Add (_description);
			Add (_textFieldContainer);

			AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			AutosizesSubviews = false;
			Opaque = true;
			BackgroundColor = UIColor.FromRGB (0xC5, 0xCC, 0xD4);

			SetNeedsLayout ();
		}
开发者ID:DrPandemic,项目名称:EraParadox,代码行数:50,代码来源:KeyboardInputView.cs

示例13: ViewDidLoad

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

            //			TableView.Frame = new RectangleF (TableView.Frame.X,TableView.Frame.Y,TABLEVIEW_WIDTH,TableView.Frame.Size.Height);
            //			ScrollView.ContentSize = new SizeF (TABLEVIEW_WIDTH ,TableView.Frame.Height);
            //			ScrollView.BackgroundColor = UIColor.LightGray;
            //

            UITableView tableView = new UITableView (new RectangleF (new PointF (5,10), new SizeF (UIScreen.MainScreen.Bounds.Width,UIScreen.MainScreen.Bounds.Height)));
            UIScrollView scrollView = new UIScrollView (new RectangleF (new PointF (5,10), new SizeF (UIScreen.MainScreen.Bounds.Width,UIScreen.MainScreen.Bounds.Height)));
            tableView.Source = new TreeViewSource (scrollView);
            scrollView.Add (tableView);
            this.View.Add (scrollView);
            this.View.BackgroundColor = UIColor.White;

            var Source = new TreeViewSource (scrollView);

            tableView.Source = Source;
        }
开发者ID:WenF,项目名称:TreeView,代码行数:20,代码来源:TreeViewViewController.cs

示例14: InitSubviews

		private void InitSubviews ()
		{
			FitpulseTheme.Apply (View);

			scrollView = new UIScrollView (UIScreen.MainScreen.Bounds);
			Add (scrollView);

			if (UISwitch.Appearance.RespondsToSelector (new Selector ("onImage"))) {
			} else {
				bool showSwitchText = !UIDevice.CurrentDevice.CheckSystemVersion (7, 0);
				var onRect = new CGRect (72, 20, 76, 42);
				var offRect = new CGRect (176, 20, 76, 42);

				if (!showSwitchText) {
				  onRect.X += 20;
				  onRect.Width -= 20;
				  offRect.Width -= 20;
				}

				var onSwitch = new SwitchOnOff (onRect);
				onSwitch.SetOn (true);

				var offSwitch = new SwitchOnOff (offRect);
				offSwitch.SetOn (false);

				onSwitch.ShowText (showSwitchText);
				offSwitch.ShowText (showSwitchText);

				scrollView.AddSubviews (onSwitch, offSwitch);
			}

			progressBar = new PercentageProgressBar (new CGRect (20, 68, 280, 24));
			progressBar.Progress = 0.5f;

			scrollView.Add (progressBar);

			var loadingLabel = new UILabel (new CGRect (118, 91, 84, 19));
			loadingLabel.Text = "Loading...";
			loadingLabel.Font = UIFont.BoldSystemFontOfSize (15);
			loadingLabel.TextColor = UIColor.FromRGB (135, 141, 138);
			loadingLabel.BackgroundColor = UIColor.Clear;
			loadingLabel.TextAlignment = UITextAlignment.Center;

			scrollView.Add (loadingLabel);		

			slider = new UISlider (new CGRect (18, 121, 284, 23));
			slider.MinValue = 0;
			slider.MaxValue = 1;
			slider.Value = 0.5f;
			slider.ValueChanged += (sender, e) => {
				progressBar.Progress = slider.Value; };

			scrollView.Add (slider);	

			var uiSegmentedControl = new UISegmentedControl (new [] {"Yes", "No", "Maybe"}) {
				SelectedSegment = 0
			};

			FitpulseTheme.Apply (uiSegmentedControl);
			uiSegmentedControl.SetWidth (80.0f, 0);
			uiSegmentedControl.SetWidth (80.0f, 1);				
			
			uiSegmentedControl.Frame = new CGRect (26, 161, 268, 44);

			scrollView.Add (uiSegmentedControl);

			textField = new UITextField (new CGRect (20, 221, 280, 31));
			textField.LeftView = new UIView (new CGRect (0, 0, 5, 31));
			textField.LeftViewMode = UITextFieldViewMode.Always;
			textField.Font = UIFont.SystemFontOfSize (14);
			textField.TextColor = UIColor.White;
			textField.Background = UIImage.FromFile ("text-input.png");
			textField.VerticalAlignment = UIControlContentVerticalAlignment.Center;
			textField.Placeholder = "Text";
			FitpulseTheme.Apply (textField);

			textField.Delegate = new TextFieldDelegate ();

			scrollView.Add (textField);

			var leftTopButton = Buttons.ElementsButton ("Button", FitpulseTheme.SharedTheme.GrayButtonImage);
			var rightTopButton = Buttons.ElementsButton ("Button", FitpulseTheme.SharedTheme.GrayPressedButtonImage);

			var leftBottomButton = Buttons.ElementsButton ("Button", FitpulseTheme.SharedTheme.BlueButtonImage);
			var rightBottomButton = Buttons.ElementsButton ("Button", FitpulseTheme.SharedTheme.BluePressedButtonImage);

			leftBottomButton.SetTitleColor (UIColor.White, UIControlState.Normal);
			leftBottomButton.SetTitleColor (UIColor.DarkGray, UIControlState.Highlighted);
			rightBottomButton.SetTitleColor (UIColor.White, UIControlState.Normal);
			rightBottomButton.SetTitleColor (UIColor.DarkGray, UIControlState.Highlighted);

			leftBottomButton.SetTitleShadowColor (UIColor.DarkGray, UIControlState.Normal);
			leftBottomButton.SetTitleShadowColor (UIColor.Gray, UIControlState.Highlighted);
			rightBottomButton.SetTitleShadowColor (UIColor.DarkGray, UIControlState.Normal);
			rightBottomButton.SetTitleShadowColor (UIColor.Gray, UIControlState.Highlighted);

			leftTopButton.Frame = new CGRect (20, 268, 126, 42);
			leftBottomButton.Frame = new CGRect (20, 318, 126, 42);
			rightTopButton.Frame = new CGRect (174, 268, 126, 42);
			rightBottomButton.Frame = new CGRect (174, 318, 126, 42);
//.........这里部分代码省略.........
开发者ID:sakr2015,项目名称:eforsah_v1.1,代码行数:101,代码来源:ElementsViewController.cs

示例15: RaffleDetailScreenView

        //********************************************
        //public GroupGoalScreenView GroupGoalView{ get; set;}
        public RaffleDetailScreenView(Tap5050Event raffle,UIImage raffleImage,UIInterfaceOrientation UIInterfaceOrientation)
        {
            this.raffle = raffle;
            this.raffleImage = raffleImage;

            BackgroundColor = UIColor.FromRGB (235, 235, 235);
            ScrollEnabled = false;
            //GUI component***********************************************
            PersonalBtn=UIButton.FromType(UIButtonType.System);
            PersonalBtn.BackgroundColor = UIColor.Clear;
            PersonalBtn.SetTitle (RaffleDetailData.PersonalGoalBtnTitle, UIControlState.Normal);
            PersonalBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(PersonalBtn);

            GrpBtn=UIButton.FromType(UIButtonType.System);
            GrpBtn.BackgroundColor = UIColor.Clear;
            GrpBtn.SetTitle (RaffleDetailData.GroupGoalBtnTitle, UIControlState.Normal);
            GrpBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(GrpBtn);

            RaffleDetailBtn=UIButton.FromType(UIButtonType.System);
            RaffleDetailBtn.BackgroundColor = UIColor.Clear;
            RaffleDetailBtn.SetTitle (RaffleDetailData.RaffleDetailBtnTitle, UIControlState.Normal);
            RaffleDetailBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(RaffleDetailBtn);

            RaffleDetailBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (RaffleDetailBarView);
            PersonalBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (PersonalBarView);
            GrpBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (GrpBarView);

            raffleDetailView = new UIScrollView () {
                BackgroundColor=UIColor.Clear,
            };
            Add (raffleDetailView);

            GoalView = new  GoalScreenView ();
            Add (GoalView);

            jackPotLabel = new UILabel ()
            {
                TextColor = UIColor.Red,
                TextAlignment=UITextAlignment.Center,
                Text="$"+raffle.jackpot_total,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            raffleDetailView.Add(jackPotLabel);

            jackPotDescriptionLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.jackpot_description,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            raffleDetailView.Add(jackPotDescriptionLabel);

            raffleImageView=new UIImageView()
            {
                ContentMode = UIViewContentMode.ScaleAspectFit,
                Image = raffleImage
            };
            raffleDetailView.Add (raffleImageView);

            raffleNameTextView = new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.event_name,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            raffleDetailView.Add(raffleNameTextView);

            licenseNumberLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=RaffleDetailData.LicenseNumberLabelText,
            };
            raffleDetailView.Add(licenseNumberLabel);

            licenseNumberLabel2 = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.licence_number
            };
            raffleDetailView.Add(licenseNumberLabel2);
//.........这里部分代码省略.........
开发者ID:MADMUC,项目名称:TAP5050,代码行数:101,代码来源:RaffleDetailScreenView.cs


注:本文中的UIScrollView.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。