コード例 #1
0
ファイル: NewAccountView.cs プロジェクト: zhongyin/CodeHub
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = UIColor.FromRGB(239, 239, 244);

            InternetButton.SetBackgroundImage(Images.Buttons.GreyButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);
            EnterpriseButton.SetBackgroundImage(Images.Buttons.BlackButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);

            InternetButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            InternetButton.Layer.ShadowOffset  = new SizeF(0, 1);
            InternetButton.Layer.ShadowOpacity = 0.3f;

            EnterpriseButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            EnterpriseButton.Layer.ShadowOffset  = new SizeF(0, 1);
            EnterpriseButton.Layer.ShadowOpacity = 0.3f;

            var set = this.CreateBindingSet <NewAccountView, NewAccountViewModel>();

            set.Bind(EnterpriseButton).To(x => x.GoToEnterpriseLoginCommand);
            set.Bind(InternetButton).To(x => x.GoToDotComLoginCommand);
            set.Apply();

            ScrollView.ContentSize = new SizeF(View.Bounds.Width, EnterpriseButton.Frame.Bottom + 10f);
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            InternetButton.SetBackgroundImage(Images.Buttons.GreyButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);
            EnterpriseButton.SetBackgroundImage(Images.Buttons.BlackButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);

            InternetButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            InternetButton.Layer.ShadowOffset  = new SizeF(0, 1);
            InternetButton.Layer.ShadowOpacity = 0.3f;

            EnterpriseButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            EnterpriseButton.Layer.ShadowOffset  = new SizeF(0, 1);
            EnterpriseButton.Layer.ShadowOpacity = 0.3f;

            InternetButton.TouchUpInside   += InternetButtonClicked;
            EnterpriseButton.TouchUpInside += EnterpriseButtonClicked;

            ScrollView.ContentSize = new SizeF(View.Bounds.Width, EnterpriseButton.Frame.Bottom + 10f);
        }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = UIColor.FromRGB(239, 239, 244);

            InternetButton.SetBackgroundImage(Images.Buttons.GreyButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);
            EnterpriseButton.SetBackgroundImage(Images.Buttons.BlackButton.CreateResizableImage(new UIEdgeInsets(18, 18, 18, 18)), UIControlState.Normal);

            InternetButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            InternetButton.Layer.ShadowOffset  = new SizeF(0, 1);
            InternetButton.Layer.ShadowOpacity = 0.3f;
            InternetButton.TouchUpInside      += (sender, e) => ViewModel.GoToDotComLoginCommand.ExecuteIfCan();

            EnterpriseButton.Layer.ShadowColor   = UIColor.Black.CGColor;
            EnterpriseButton.Layer.ShadowOffset  = new SizeF(0, 1);
            EnterpriseButton.Layer.ShadowOpacity = 0.3f;

            EnterpriseButton.TouchUpInside += (sender, e) => GoToEnterprise();

            ScrollView.ContentSize = new SizeF(View.Bounds.Width, EnterpriseButton.Frame.Bottom + 10f);
        }