コード例 #1
0
ファイル: DebugPopup.cs プロジェクト: hdir/ga10
        public DebugPopup(TestingViewModel testingViewModel)
        {
            BackgroundColor = Color.FromRgba(0, 0, 0, 0.5f);

            var btnClose = DefaultView.CloseButton();

            btnClose.HorizontalOptions = LayoutOptions.Center;
            btnClose.VerticalOptions   = LayoutOptions.End;
            btnClose.Margin            = new Thickness(20);

            btnClose.AddTouch((sender, args) => { PopupNavigation.Instance.PopAsync(); });


            var scrollView = new ScrollView
            {
                Orientation = ScrollOrientation.Vertical,
                Content     = new TestingView {
                    BindingContext = testingViewModel
                },
            };

            Content = new Grid()
            {
                BackgroundColor = Colors.Background,
                Children        =
                {
                    scrollView,
                    btnClose,
                }
            };
        }
コード例 #2
0
ファイル: TermsPopupPage.cs プロジェクト: hdir/ga10
        public TermsPopupPage()
        {
            BackgroundColor = Colors.BulletinPopupBackground;

            var btnClose = DefaultView.CloseButton();

            btnClose.HorizontalOptions = LayoutOptions.Center;
            btnClose.VerticalOptions   = LayoutOptions.End;
            btnClose.Margin            = new Thickness(20);

            btnClose.AddTouch((sender, args) => { PopupNavigation.Instance.PopAsync(); });

            Content = new Grid()
            {
                BackgroundColor = Colors.Background,
                Children        =
                {
                    new TermsScrollView()
                    {
                        Padding = new Thickness(0, 0, 0, FooterHeight)
                    },
                    new GradientView(Colors.Background)
                    {
                        VerticalOptions  = LayoutOptions.End,
                        Orientation      = StackOrientation.Vertical,
                        HeightRequest    = FooterHeight,
                        InputTransparent = true,
                        ScaleY           = -1,
                    },
                    btnClose,
                }
            };
        }
コード例 #3
0
ファイル: CardView.cs プロジェクト: hdir/ga10
        public CardView(View content)
        {
            HeightRequest   = 200;
            CornerRadius    = Sizes.CornerRadius;
            BackgroundColor = Colors.InfoPopupBackground;
            HasShadow       = true;
            BorderColor     = Device.RuntimePlatform == Device.Android
                ? Color.FromRgba(0, 0, 0, 0.3f)
                : Color.Transparent;

            var btnClose = DefaultView.CloseButton();

            btnClose.HorizontalOptions = LayoutOptions.Center;
            btnClose.VerticalOptions   = LayoutOptions.End;
            btnClose.Margin            = new Thickness(0, 0, 0, 20);
            btnClose.AddTouch((sender, args) => OnClose());
            Padding = 0;

            content.Margin = new Thickness(
                content.Margin.Left,
                content.Margin.Top,
                content.Margin.Right,
                Math.Max(CornerRadius, content.Margin.Bottom));

            Content = new Grid()
            {
                Padding  = 0,
                Children =
                {
                    content,
                    new GradientView(Colors.InfoPopupBackground)
                    {
                        VerticalOptions  = LayoutOptions.End,
                        HeightRequest    = FooterHeight,
                        Orientation      = StackOrientation.Vertical,
                        InputTransparent = true,
                        ScaleY           = -1,
                        Margin           = new Thickness(2, CornerRadius),
                    },
                    btnClose,
                }
            };
        }