Пример #1
0
        View CreateSpeakerImage()
        {
            var picture = new RoundedImageView
            {
                WidthRequest      = 125,
                HeightRequest     = 125,
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };

            picture.SetBinding(RoundedImageView.SourceProperty, "PrimarySpeakerHeadshot");

            return(picture);
        }
        View CreateScavengerHuntImage()
        {
            var huntImage = new RoundedImageView
            {
                WidthRequest  = 75,
                HeightRequest = 75
            };

            huntImage.SetBinding(RoundedImageView.SourceProperty, "CapturedImage", converter: new ByteArrayToImageSourceConverter());

            var huntImageView = new StackLayout {
                Orientation = StackOrientation.Horizontal,
                Children    =
                {
                    huntImage
                }
            };

            return(huntImageView);
        }
        View CreateImage()
        {
            var image = new RoundedImageView {
                HeightRequest = 100,
                WidthRequest  = 100
            };

            image.SetBinding(Image.SourceProperty, "ImageUri");

            var view = new StackLayout {
                Orientation       = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.Center,
                Children          =
                {
                    image
                }
            };

            return(view);
        }
Пример #4
0
        View CreateHaveImage()
        {
            var haveImage = new RoundedImageView
            {
                Source        = "camera_large.png",
                WidthRequest  = 120,
                HeightRequest = 120,
            };

            haveImage.GestureRecognizers.Add(CreateTapGestureRecognizer());
            haveImage.SetBinding(Image.SourceProperty, "CapturedImage");

            var haveImageView = new StackLayout
            {
                Orientation       = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Children          =
                {
                    haveImage
                }
            };

            return(haveImageView);
        }
Пример #5
0
        View CreateNeedImage()
        {
            var needImage = new RoundedImageView
            {
                //Source = "temp_selfie.jpg",
                WidthRequest  = 120,
                HeightRequest = 120
            };

            //needImage.SetBinding (Image.SourceProperty, "WhatYouNeedImage", converter: new ByteArrayToImageSourceConverter());
            needImage.SetBinding(Image.SourceProperty, "WhatYouNeedImage");

            var needImageView = new StackLayout
            {
                Orientation       = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Children          =
                {
                    needImage
                }
            };

            return(needImageView);
        }