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


C# UIImageView.Above方法代码示例

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


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

示例1: VisualEditorViewController

        public VisualEditorViewController()
        {
            View.BackgroundColor = Styling.Colors.BackgroundColor;

              View.AddGestureRecognizer(new UITapGestureRecognizer(ViewTap));

              var discountLabel = new UILabel
              {
            BackgroundColor = Styling.Colors.Green,
            Text = "25% OFF YOUR FIRST ORDER IF YOU SIGN UP BY 9/1",
            Font = UIFont.FromName("Gotham-Medium", 11),
            TextColor = UIColor.White,
            TextAlignment = UITextAlignment.Center
              };

              var image = new UIImageView
              {
            Image = UIImage.FromBundle("Images/widgetCoLogo_red"),
              };

              var emailLabel = new UILabel
              {
            Text = "Email",
            Font = UIFont.FromName("Gotham-Light", 10)
              };
              var emailField = new CustomTextField
              {
            Placeholder = "[email protected]"
              };

              var phoneLabel = new UILabel
              {
            Text = "Phone Number:",
            Font = UIFont.FromName("Gotham-Light", 10)
              };

              var phoneField = new CustomTextField
              {
            Placeholder = "(555)-555-5555"
              };

              var passwordLabel = new UILabel
              {
            Text = "Password",
            Font = UIFont.FromName("Gotham-Light", 10)
              };

              var passwordField = new CustomTextField
              {
            SecureTextEntry = true,
              };

              var button = new CustomButton
              {
            TitleText = "Take me to the widgets"
              };

              View.AddSubviews(emailLabel, emailField, phoneLabel, phoneField, passwordLabel, passwordField, button, discountLabel, image);

              View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

              View.AddConstraints(
            discountLabel.WithSameTop(View),
            discountLabel.WithSameLeft(View),
            discountLabel.WithSameRight(View),
            discountLabel.Height().EqualTo(30),

            phoneLabel.WithSameLeft(phoneField),
            phoneLabel.WithSameCenterY(View),

            phoneField.WithSameCenterX(View),
            phoneField.Height().EqualTo(30),
            phoneField.Width().EqualTo(200),
            phoneField.Below(phoneLabel).Plus(5),

            emailField.WithSameLeft(phoneField),
            emailField.WithSameWidth(phoneField),
            emailField.WithSameHeight(phoneField),
            emailField.Above(phoneLabel).Minus(15),

            emailLabel.WithSameLeft(phoneField),
            emailLabel.Above(emailField).Minus(5),

            image.WithSameCenterX(View),
            image.Above(emailLabel).Minus(15),

            passwordLabel.WithSameLeft(phoneField),
            passwordLabel.Below(phoneField).Plus(15),

            passwordField.WithSameLeft(phoneField),
            passwordField.WithSameWidth(phoneField),
            passwordField.WithSameHeight(phoneField),
            passwordField.Below(passwordLabel).Plus(5),

            button.Below(passwordField).Plus(20),
            button.WithSameCenterX(View),
            button.WithSameWidth(phoneField),
            button.Height().EqualTo(50)
              );
        }
开发者ID:ahouhel,项目名称:XamarinBindings,代码行数:100,代码来源:VisualEditorViewController.cs


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