• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UIView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UIView的典型用法代码示例。如果您正苦于以下问题:C# UIView类的具体用法?C# UIView怎么用?C# UIView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UIView类属于命名空间,在下文中一共展示了UIView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ViewForItem

		public override UIView ViewForItem(CarouselView carousel, uint index, UIView reusingView)
		{

			UILabel label;

			if (reusingView == null)
			{
				var imgView = new UIImageView(new RectangleF(0, 0, 200, 200))
				{

					Image = FromUrl( index > 1 ? product[0].ImageForSize(250) : product[(int)index].ImageForSize(250) ),
					ContentMode = UIViewContentMode.Center
				};


				label = new UILabel(imgView.Bounds)
				{
					BackgroundColor = UIColor.Clear,
					TextAlignment = UITextAlignment.Center,
					Tag = 1
				};
				label.Font = label.Font.WithSize(50);
				imgView.AddSubview(label);
				reusingView = imgView;
			}
			else
			{
				label = (UILabel)reusingView.ViewWithTag(1);
			}
				

			return reusingView;
		}
开发者ID:jonburn,项目名称:xamarin-store-app,代码行数:33,代码来源:ProductListViewController.cs


示例2: ViewDidLoad

        public override void ViewDidLoad()
        {
            View = new UIView(){ BackgroundColor = UIColor.White};
            base.ViewDidLoad();

            var label = new UILabel(new RectangleF(10, 10, 300, 40));
            Add(label);
            var textField = new UITextField(new RectangleF(10, 50, 300, 40));
            Add(textField);
            var button = new UIButton(UIButtonType.RoundedRect);
            button.SetTitle("Click Me", UIControlState.Normal);
            button.Frame = new RectangleF(10, 90, 300, 40);
            Add(button);
            var button2 = new UIButton(UIButtonType.RoundedRect);
            button2.SetTitle("Go Second", UIControlState.Normal);
            button2.Frame = new RectangleF(10, 130, 300, 40);
            Add(button2);

            var set = this.CreateBindingSet<FirstView, Core.ViewModels.FirstViewModel>();
            set.Bind(label).To(vm => vm.Hello);
            set.Bind(textField).To(vm => vm.Hello);
            set.Bind(button).To(vm => vm.MyCommand);
            set.Bind(button2).To(vm => vm.GoSecondCommand);
            set.Apply();
        }
开发者ID:janvdp,项目名称:NPlus1DaysOfMvvmCross,代码行数:25,代码来源:FirstView.cs


示例3: getRootSuperView

 private UIView getRootSuperView(UIView view)
 {
     if (view.Superview == null)
         return view;
     else
         return getRootSuperView(view.Superview);
 }
开发者ID:praveenmohanmm,项目名称:PurposeColor_Bkp_Code,代码行数:7,代码来源:CustomEditorRenderer.cs


示例4: FinishedLaunching

		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var controller = new UIViewController();
			var view = new UIView (UIScreen.MainScreen.Bounds);
			view.BackgroundColor = UIColor.White;
			controller.View = view;

			controller.NavigationItem.Title = "SignalR Client";

			var textView = new UITextView(new CGRect(0, 0, 320, view.Frame.Height - 0));
			view.AddSubview (textView);


			navController = new UINavigationController (controller);

			window.RootViewController = navController;
			window.MakeKeyAndVisible();

			if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
				textView.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
				return true;
			}
			
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync(SIGNALR_DEMO_SERVER);

			return true;
		}
开发者ID:Coladela,项目名称:signalr-chat,代码行数:32,代码来源:AppDelegate.cs


示例5: ViewDidLoad

		public override void ViewDidLoad ()
		{
            loadingBg = new UIView (this.View.Frame) { 
                BackgroundColor = UIColor.Black, 
                AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight 
            };
            loadingView = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.WhiteLarge) {
                AutoresizingMask = UIViewAutoresizing.FlexibleMargins
            };
			loadingView.Frame = new CGRect ((this.View.Frame.Width - loadingView.Frame.Width) / 2, 
				(this.View.Frame.Height - loadingView.Frame.Height) / 2,
				loadingView.Frame.Width, 
				loadingView.Frame.Height);
			
			loadingBg.AddSubview (loadingView);
			View.AddSubview (loadingBg);
			loadingView.StartAnimating ();

			scannerView = new AVCaptureScannerView(new CGRect(0, 0, this.View.Frame.Width, this.View.Frame.Height));
			scannerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			scannerView.UseCustomOverlayView = this.Scanner.UseCustomOverlay;
			scannerView.CustomOverlayView = this.Scanner.CustomOverlay;
			scannerView.TopText = this.Scanner.TopText;
			scannerView.BottomText = this.Scanner.BottomText;
			scannerView.CancelButtonText = this.Scanner.CancelButtonText;
			scannerView.FlashButtonText = this.Scanner.FlashButtonText;
            scannerView.OnCancelButtonPressed += () => {
                Scanner.Cancel ();
            };

			this.View.AddSubview(scannerView);
			this.View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
		}
开发者ID:rpmendes2017,项目名称:ZXing.Net.Mobile,代码行数:33,代码来源:AVCaptureScannerViewController.cs


示例6: ViewDidLoad

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

            var view = new UIView
            {
                BackgroundColor = UIColor.White
            };

            var label = new UILabel
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                Text = "No Conversation Selected",
                TextColor = UIColor.FromWhiteAlpha(0.0f, 0.4f),
                Font = UIFont.PreferredHeadline
            };
            view.AddSubview(label);

            view.AddConstraint(NSLayoutConstraint.Create(label, NSLayoutAttribute.CenterX, NSLayoutRelation.Equal,
                    view, NSLayoutAttribute.CenterX, 1.0f, 0.0f));
            view.AddConstraint(NSLayoutConstraint.Create(label, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal,
                    view, NSLayoutAttribute.CenterY, 1.0f, 0.0f));

            View = view;
        }
开发者ID:flolovebit,项目名称:xamarin-evolve-2014,代码行数:25,代码来源:AAPLEmptyViewController.cs


示例7: ViewDidLoad

        public override void ViewDidLoad()
        {
            View = new UIView(){ BackgroundColor = UIColor.White};
            base.ViewDidLoad();

            // ios7 layout
            if (RespondsToSelector(new Selector("edgesForExtendedLayout")))
                EdgesForExtendedLayout = UIRectEdge.None;

            var textField = new UITextField(new RectangleF(10, 10, 300, 40));
            Add(textField);

            var tableView = new UITableView(new RectangleF(0, 50, 320, 500), UITableViewStyle.Plain);
            Add(tableView);

			// choice here:
			//
			//   for original demo use:
            //     var source = new MvxStandardTableViewSource(tableView, "TitleText");
			//
			//   or for prettier cells from XIB file use:
			//     tableView.RowHeight = 88;
			//     var source = new MvxSimpleTableViewSource(tableView, BookCell.Key, BookCell.Key);

			tableView.RowHeight = 88;
			var source = new MvxSimpleTableViewSource(tableView, BookCell.Key, BookCell.Key);
			tableView.Source = source;

            var set = this.CreateBindingSet<FirstView, Core.ViewModels.FirstViewModel>();
            set.Bind(textField).To(vm => vm.SearchTerm);
            set.Bind(source).To(vm => vm.Results);
            set.Apply();

            tableView.ReloadData();
        }
开发者ID:KiranKumarAlugonda,项目名称:NPlus1DaysOfMvvmCross,代码行数:35,代码来源:FirstView.cs


示例8: UIViewElement

 /// <summary>
 ///   Constructor
 /// </summary>
 /// <param name="caption">
 /// The caption, only used for RootElements that might want to summarize results
 /// </param>
 /// <param name="view">
 /// The view to display
 /// </param>
 /// <param name="transparent">
 /// If this is set, then the view is responsible for painting the entire area,
 /// otherwise the default cell paint code will be used.
 /// </param>
 public UIViewElement(string caption, UIView view, bool transparent)
     : base(caption)
 {
     this.View = view;
     this.Flags = transparent ? CellFlags.Transparent : 0;
     key = new NSString("UIViewElement" + _count++);
 }
开发者ID:acejack987,项目名称:CivicaGlossaryIOSApp,代码行数:20,代码来源:UIViewElement.cs


示例9: TabControlItem

        public TabControlItem(CGRect frame, string title)
        {
            this.Frame = frame;
            var parentFrame = frame;
            var labelFont = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? UIFont.BoldSystemFontOfSize(15) : UIFont.BoldSystemFontOfSize(10);

            this.labelTitle = new UILabel(new CGRect(0, 0, parentFrame.Width / 2, parentFrame.Height))
            {
                Text = title,
                TextAlignment = UITextAlignment.Center,
                AdjustsFontSizeToFitWidth = true,
                LineBreakMode = UILineBreakMode.TailTruncation,
                Lines = 2,
                Font = labelFont
            };

            this.button = new UIButton(new CGRect(0, 0, parentFrame.Width, parentFrame.Height));
            this.viewColor = new UIView(new CGRect(0, parentFrame.Height - 1, parentFrame.Width, 1));

            this.Add(this.labelTitle);
            this.Add(this.button);
            this.Add(this.viewColor);

            this.button.TouchUpInside += (s, e) =>
            {
                if (tabEnabled)
                {
                    SelectTab();
                }
            };
        }
开发者ID:Immons,项目名称:XamarinHelper,代码行数:31,代码来源:TabControlItem.cs


示例10: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            normalButton = GetButton (new CGRect (10, 120, 295, 48),
                                      FoodyTheme.SharedTheme.ButtonImage,
                                      "Standard Button");
            View.AddSubview (normalButton);

            pressedButton = GetButton (new CGRect (10, 190, 295, 48),
                                       FoodyTheme.SharedTheme.PressedButtonImage,
                                       "Button Pressed");
            View.AddSubview (pressedButton);

            label = new UILabel (new CGRect (15, 40, 400, 30));
            FoodyTheme.Apply (label);
            label.Text = "Label";
            View.AddSubview (label);

            var paddingView = new UIView (new CGRect (0, 0, 5, 20));
            TextField.LeftView = paddingView;
            TextField.LeftViewMode = UITextFieldViewMode.Always;
            TextField.ShouldReturn = TextFieldShouldReturn;
            TextField.Background = FoodyTheme.SharedTheme.TextFieldBackground;

            progress = new UIProgressView (new CGRect (13, 300, 292, 10));
            progress.Progress = 0.5f;
            View.AddSubview (progress);

            slider = new UISlider (new CGRect (10, 330, 298, 10));
            slider.Value = 0.5f;
            slider.ValueChanged += HandleValueChanged;
            View.AddSubview (slider);

            FoodyTheme.Apply (View);
        }
开发者ID:alleeclark,项目名称:morganHack,代码行数:35,代码来源:ElementThemeController.cs


示例11: ViewDidLoad

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

            View = new UIView() { BackgroundColor = UIColor.White };

            if (RespondsToSelector(new Selector("edgesForExtendedLayout")))
                EdgesForExtendedLayout = UIRectEdge.None;

            TableView = new UITableView(UIScreen.MainScreen.Bounds);
            var source = new MvxStandardTableViewSource(
                TableView,
                UITableViewCellStyle.Subtitle,
                CellIdentifier,
                "TitleText Title; DetailText Start"
            );

            TableView.Source = source;

            var set = this.CreateBindingSet<ConferenceView, ConferenceViewModel>();
            set.Bind(source).To(vm => vm.Sessions);
            set.Apply();

            TableView.ReloadData();
        }
开发者ID:RobGibbens,项目名称:CodeStock,代码行数:25,代码来源:ConferenceView.cs


示例12: LoadView

        //Recipe 2-1 Adding Nested Subviews
        public override void LoadView()
        {
            //Create the main view
            RectangleF appRect = UIScreen.MainScreen.ApplicationFrame;

            contentView = new UIView(appRect);
            contentView.BackgroundColor = UIColor.Green;

            //Provide support for autorotation and resizing
            contentView.AutosizesSubviews = true;
            contentView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View = contentView;

            // reset the origin point for subviews. The new origin is 0, 0
            appRect.Location = new PointF(0.0f, 0.0f);

            //Add the subviews, each stepped by 32 pixels on each side
            var subview = new UIView(RectangleF.Inflate(appRect, -32.0f, -32.0f));
            subview.BackgroundColor = UIColor.Clear;
            contentView.AddSubview(subview);

            subview = new UIView(RectangleF.Inflate(appRect, -64.0f, -64.0f));
            subview.BackgroundColor = UIColor.DarkGray;
            contentView.AddSubview(subview);

            subview = new UIView(RectangleF.Inflate(appRect, -96.0f, -96.0f));
            subview.BackgroundColor = UIColor.Black;
            contentView.AddSubview(subview);
        }
开发者ID:lobrien,项目名称:iPhone-Developer-s-Cookbook-in-Monotouch,代码行数:30,代码来源:MyViewController.cs


示例13: AwakeFromNib

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

            if (!Theme.IsiOS7) {
                BackgroundView = new UIImageView { Image = Theme.Inlay };
                photoFrame.Image = Theme.PhotoFrame;
                return;
            }

            SelectionStyle = UITableViewCellSelectionStyle.Blue;
            SelectedBackgroundView = new UIView { BackgroundColor = UIColor.Clear };
            BackgroundView = new UIView { BackgroundColor = Theme.BackgroundColor };

            date.TextColor =
                description.TextColor = Theme.LabelColor;
            date.Font = Theme.FontOfSize (18);
            description.Font = Theme.FontOfSize (14);

            //Change the image frame
            var frame = photoFrame.Frame;
            frame.Y = 0;
            frame.Height = Frame.Height;
            frame.Width -= 12;
            photo.Frame = frame;

            //Changes to widths on text
            frame = date.Frame;
            frame.Width -= 15;
            date.Frame = frame;

            frame = description.Frame;
            frame.Width -= 15;
            description.Frame = frame;
        }
开发者ID:tranuydu,项目名称:prebuilt-apps,代码行数:35,代码来源:PhotoCell.cs


示例14: Container

        //
        public Container()
        {
            ClipsToBounds = true;
              _state = State.Collapsed;

              Layer.BackgroundColor = UIColor.White.CGColor;
              Layer.BorderColor = UIColor.LightGray.CGColor;
              Layer.BorderWidth = 1;

              Header = this.Add<Header>();
              _content = this.Add<UIView>();
              _content.ClipsToBounds = true;

              Header.BackgroundColor = UIColor.White;
              Header.Layer.BorderColor = UIColor.LightGray.CGColor;
              Header.Layer.BorderWidth = 1;

              Header
            .Anchor(NSLayoutAttribute.Top, this, NSLayoutAttribute.Top)
            .Anchor(NSLayoutAttribute.Left, this, NSLayoutAttribute.Left)
            .Anchor(NSLayoutAttribute.Right, this, NSLayoutAttribute.Right);

              _content
            .Anchor(NSLayoutAttribute.Top, Header, NSLayoutAttribute.Bottom)
            .Anchor(NSLayoutAttribute.Left, this, NSLayoutAttribute.Left)
            .Anchor(NSLayoutAttribute.Right, this, NSLayoutAttribute.Right)
            .Anchor(NSLayoutAttribute.Bottom, this, NSLayoutAttribute.Bottom);
        }
开发者ID:sebbarg,项目名称:yagnix,代码行数:29,代码来源:Container.cs


示例15: SaveAndLaunchFile

        public Task SaveAndLaunchFile(Stream stream, string fileType)
        {
            if (OriginView == null) return Task.FromResult(true);

            var data = NSData.FromStream(stream);
            var width = 824;
            var height = 668;

            var popoverView = new UIView(new RectangleF(0, 0, width, height));
            popoverView.BackgroundColor = UIColor.White;
            var webView = new UIWebView();
            webView.Frame = new RectangleF(0, 45, width, height - 45);

            var b = new UIButton(UIButtonType.RoundedRect);
            b.SetTitle("Done", UIControlState.Normal);
            b.Frame = new RectangleF(10,10, 60, 25);
            b.TouchUpInside += (o, e) => _popoverController.Dismiss(true);

            popoverView.AddSubview(b);
            popoverView.AddSubview(webView);

            var bundlePath = NSBundle.MainBundle.BundlePath;
            System.Diagnostics.Debug.WriteLine(bundlePath);
            webView.LoadData(data, "application/pdf", "utf-8", NSUrl.FromString("http://google.com"));

            var popoverContent = new UIViewController();
            popoverContent.View = popoverView;

            _popoverController = new UIPopoverController(popoverContent);
            _popoverController.PopoverContentSize = new SizeF(width, height);
            _popoverController.PresentFromRect(new RectangleF(OriginView.Frame.Width/2, 50, 1, 1), OriginView, UIPopoverArrowDirection.Any, true);
            _popoverController.DidDismiss += (o, e) => _popoverController = null;

            return Task.FromResult(true);
        }
开发者ID:reactiveui-forks,项目名称:VirtualSales,代码行数:35,代码来源:PlatformServices.cs


示例16: CompileConstraint

        static NSLayoutConstraint CompileConstraint(BinaryExpression expr, UIView constrainedView)
        {
            var rel = NSLayoutRelation.Equal;
            switch (expr.NodeType)
            {
                case ExpressionType.Equal:
                    rel = NSLayoutRelation.Equal;
                    break;
                case ExpressionType.LessThanOrEqual:
                    rel = NSLayoutRelation.LessThanOrEqual;
                    break;
                case ExpressionType.GreaterThanOrEqual:
                    rel = NSLayoutRelation.GreaterThanOrEqual;
                    break;
                default:
                    throw new NotSupportedException("Not a valid relationship for a constrain.");
            }

            var left = GetViewAndAttribute(expr.Left);
            if (left.Item1 != constrainedView)
            {
                left.Item1.TranslatesAutoresizingMaskIntoConstraints = false;
            }

            var right = GetRight(expr.Right);

            return NSLayoutConstraint.Create(
                left.Item1, left.Item2,
                rel,
                right.Item1, right.Item2,
                right.Item3, right.Item4);
        }
开发者ID:phillipkoeln,项目名称:Variable-Table-Cell-Height-Xamarin.iOS,代码行数:32,代码来源:Layout.cs


示例17: BindingContext

		public BindingContext(UIView view, string title, Theme currentTheme)
		{
			if (view == null)
				throw new ArgumentNullException("view");
			
			var parser = new ViewParser();

			parser.Parse(view, title, currentTheme);
			Root = parser.Root;

			var viewContext = view as IBindingContext;
			if (viewContext != null)
			{
				viewContext.BindingContext = this;
				var dataContext = view as IDataContext;
				if (dataContext != null)
				{
					var vmContext = dataContext.DataContext as IBindingContext;
					if (vmContext != null)
					{
						vmContext.BindingContext = this;
					}
				}
			}
		}
开发者ID:eiu165,项目名称:MonoMobile.Views,代码行数:25,代码来源:BindingContext.cs


示例18: buildReport

        public void buildReport()
        {
            Root = new RootElement ("");
            var v = new UIView ();
            v.Frame = new RectangleF (10, 10, 600, 10);
            var dummy = new Section (v);
            Root.Add (dummy);
            var headerLabel = new UILabel (new RectangleF (10, 10, 800, 48)) {
                Font = UIFont.BoldSystemFontOfSize (18),
                BackgroundColor = ColorHelper.GetGPPurple (),
                TextAlignment = UITextAlignment.Center,
                TextColor = UIColor.White,
                Text = "Branch Matter Analysis"
            };
            var view = new UIViewBordered ();
            view.Frame = new RectangleF (10, 20, 800, 48);
            view.Add (headerLabel);
            Root.Add (new Section (view));
            //
            for (int i = 0; i < report.branches.Count; i++) {
                Branch branch = report.branches [i];

                Section s = new Section (branch.name + " Branch Totals");
                Root.Add (s);
                //
                if (branch.branchTotals.matterActivity != null) {
                    var matterActivitySection = new Section ();
                    var mTitle = new TitleElement ("Matter Activity");
                    matterActivitySection.Add (mTitle);
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.active, "Active Matters: "));
                    matterActivitySection.Add (new NumberElement (
                        branch.branchTotals.matterActivity.deactivated,
                        "Deactivated Matters: "
                    ));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.newWork, "New Work: "));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.workedOn, "Worked On: "));

                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.noActivity, "No Activity: "));
                    matterActivitySection.Add (new StringElement ("No Activity Duration: " + branch.branchTotals.matterActivity.noActivityDuration));
                    Root.Add (matterActivitySection);
                }
                //
                if (branch.branchTotals.matterBalances != null) {
                    var matterBalancesSection = new Section ();
                    var mTitle = new TitleElement ("Matter Balances");
                    matterBalancesSection.Add (mTitle);
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.business, S.GetText (S.BUSINESS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.trust, S.GetText (S.TRUST_BALANCE) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.investment, S.GetText (S.INVESTMENTS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.unbilled, "Unbilled: "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.pendingDisbursements, "Pending Disb.: "));
                    Root.Add (matterBalancesSection);
                }

            }

            for (var i = 0; i < 10; i++) {
                Root.Add (new Section (" "));
            }
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:60,代码来源:MatterAnalysisBranchController.cs


示例19: AddShadowToView

		private UIView AddShadowToView (UIView view, bool reverse)
		{
			UIView containerView = view.Superview;

			var viewWithShadow = new UIView (view.Frame);
			containerView.InsertSubviewAbove (viewWithShadow, view);
			view.RemoveFromSuperview ();

			var shadowView = new UIView (viewWithShadow.Bounds);

			var colors = new CGColor[] {
				UIColor.FromWhiteAlpha(0f, 0f).CGColor,
				UIColor.FromWhiteAlpha(0f, 0.5f).CGColor
			};

			var gradient = new CAGradientLayer () {
				Frame = shadowView.Bounds,
				Colors =  colors
			};

			gradient.StartPoint = new CGPoint (reverse ? 0f : 1f, 0f);
			gradient.EndPoint = new CGPoint (reverse ? 1f : 0f, 0f);
			shadowView.Layer.InsertSublayer (gradient, 1);

			view.Frame = view.Bounds;
			viewWithShadow.AddSubview (view);

			viewWithShadow.AddSubview (shadowView);
			return viewWithShadow;
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:30,代码来源:CEFlipAnimationController.cs


示例20: LoadView

        public override void LoadView ()
        {
            View = new UIView ().Apply (Style.Screen);

            Add (new SeparatorView ().Apply (Style.Settings.Separator));
            Add (askProjectView = new LabelSwitchView () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.Settings.RowBackground).Apply (BindAskProjectView));
            askProjectView.Label.Apply (Style.Settings.SettingLabel);
            askProjectView.Label.Text = "SettingsAskProject".Tr ();
            askProjectView.Switch.ValueChanged += OnAskProjectViewValueChanged;

            Add (new SeparatorView ().Apply (Style.Settings.Separator));
            Add (new UILabel () {
                Text = "SettingsAskProjectDesc".Tr (),
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.Settings.DescriptionLabel));

            Add (new SeparatorView ().Apply (Style.Settings.Separator));
            Add (mobileTagView = new LabelSwitchView () {
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.Settings.RowBackground).Apply (BindMobileTagView));
            mobileTagView.Label.Apply (Style.Settings.SettingLabel);
            mobileTagView.Label.Text = "SettingsMobileTag".Tr ();
            mobileTagView.Switch.ValueChanged += OnMobileTagViewValueChanged;

            Add (new SeparatorView ().Apply (Style.Settings.Separator));
            Add (new UILabel () {
                Text = "SettingsMobileTagDesc".Tr (),
                TranslatesAutoresizingMaskIntoConstraints = false,
            }.Apply (Style.Settings.DescriptionLabel));

            View.AddConstraints (MakeConstraints (View));
        }
开发者ID:nagyist,项目名称:toggl-mobile,代码行数:34,代码来源:SettingsViewController.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UIViewController类代码示例发布时间:2022-05-24
下一篇:
C# UIUVRect类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap