コード例 #1
0
        Button CreateRateButton()
        {
            var rateButton = new RateButton
            {
                Text              = "Rate Session",
                TextColor         = Color.FromHex("007aff"),
                Font              = Font.OfSize(Fonts.OpenSans, 12),
                BackgroundColor   = Color.Transparent,
                BorderColor       = Color.FromHex("007aff"),
                BorderRadius      = 7,
                BorderWidth       = 1,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions   = LayoutOptions.End,
                WidthRequest      = 140,
                HeightRequest     = 35
            };

            rateButton.Clicked += (object sender, EventArgs e) =>
            {
                var selectedSession = (SessionInfoViewModel)sessionInfoCarousel.SelectedItem;
                var sessionId       = selectedSession.Session.Id;

                Navigation.PushAsync(new RateSessionView(sessionId));
            };

            return(rateButton);
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (DismissButton != null)
            {
                DismissButton.Dispose();
                DismissButton = null;
            }

            if (MainContainer != null)
            {
                MainContainer.Dispose();
                MainContainer = null;
            }

            if (RateButton != null)
            {
                RateButton.Dispose();
                RateButton = null;
            }

            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }
        }
コード例 #3
0
 void SetStyles()
 {
     View.BackgroundColor          = AppColors.PageBackground;
     MainContainer.BackgroundColor = AppColors.GrayBackground;
     TableView.BackgroundColor     = AppColors.GrayBackground;
     RateButton.StyleStandardButton();
     DismissButton.StyleFlatButton();
     RateButton.SetTitle("RATE US ON GOOGLE PLAY", UIControlState.Normal);
     DismissButton.SetTitle("DISMISS", UIControlState.Normal);
 }
コード例 #4
0
        View CreateGravatarButton()
        {
            // what is gravatar infomation button
            var gravatarButton = new RateButton
            {
                Text              = "What is gravatar?",
                TextColor         = Color.FromHex("26ade6"),
                Font              = Font.OfSize(Fonts.OpenSans, 12),
                BackgroundColor   = Color.Transparent,
                BorderColor       = Color.FromHex("26ade6"),
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BorderRadius      = 7,
                BorderWidth       = 1,
                HeightRequest     = 35,
                WidthRequest      = 125
            };

            gravatarButton.SetBinding(Button.CommandProperty, "InfoCommand");

            return(gravatarButton);
        }
コード例 #5
0
		Button CreateRateButton ()
		{
			var rateButton = new RateButton 
			{
				Text = "Rate Session",
				TextColor = Color.FromHex ("007aff"),
				Font = Font.OfSize(Fonts.OpenSans, 12),
				BackgroundColor = Color.Transparent,
				BorderColor = Color.FromHex ("007aff"),
				BorderRadius = 7,
				BorderWidth = 1,
				HorizontalOptions = LayoutOptions.CenterAndExpand,
				VerticalOptions = LayoutOptions.End,
				WidthRequest = 140,
				HeightRequest = 35
			};

			rateButton.Clicked += (object sender, EventArgs e) => 
			{
				var selectedSession = (SessionInfoViewModel)sessionInfoCarousel.SelectedItem;
				var sessionId = selectedSession.Session.Id;

				Navigation.PushAsync(new RateSessionView(sessionId));
			};

			return rateButton;
		}
コード例 #6
0
		View CreateGravatarButton ()
		{
			// what is gravatar infomation button
			var gravatarButton = new RateButton 
			{
				Text = "What is gravatar?",
				TextColor = Color.FromHex ("26ade6"),
				Font = Font.OfSize (Fonts.OpenSans, 12),
				BackgroundColor = Color.Transparent,
				BorderColor = Color.FromHex ("26ade6"),
				HorizontalOptions = LayoutOptions.StartAndExpand,
				BorderRadius = 7,
				BorderWidth = 1,
				HeightRequest = 35,
				WidthRequest = 125
			};
			gravatarButton.SetBinding (Button.CommandProperty, "InfoCommand");

			return gravatarButton;
		}