Inheritance: Xamarin.Forms.ScrollView
Exemplo n.º 1
0
        private View CreateSinglePhotoViewer()
        {
            // Create a signle PhotoView
            _photoView = new PhotoView()
            {
                BackgroundColor = Color.Gray
            };

            _photoView.Tap += OnPhotoTab;

            // Add the PhotoView to a layout
            var layout = new RelativeLayout();

            layout.Children.Add(_photoView,
                                xConstraint: Constraint.Constant(0),
                                yConstraint: Constraint.Constant(0),
                                widthConstraint: Constraint.RelativeToParent((parent) =>
            {
                return(parent.Width);
            }),
                                heightConstraint: Constraint.RelativeToParent((parent) =>
            {
                return(parent.Height);
            }));

            return(layout);
        }
Exemplo n.º 2
0
        // ------------------------------------------------

        #region Constructors

        public ImageTemplate()
        {
            _photoView = new PhotoView()
            {
                BackgroundColor = Color.Gray
            };
        }
Exemplo n.º 3
0
        private View CreateSinglePhotoViewer()
        {
            // Create a signle PhotoView
            _photoView = new PhotoView() { BackgroundColor = Color.Gray };

            _photoView.Tap += OnPhotoTab;

            // Add the PhotoView to a layout
            var layout = new RelativeLayout();

            layout.Children.Add(_photoView, 
                xConstraint: Constraint.Constant(0),
                yConstraint: Constraint.Constant(0),
                widthConstraint: Constraint.RelativeToParent((parent) =>
                    {
                        return parent.Width;
                    }),
                heightConstraint: Constraint.RelativeToParent((parent) =>
                    {
                        return parent.Height;
                    }));

            return layout;
        }
Exemplo n.º 4
0
        // ------------------------------------------------

        #region Constructors

        public ImageTemplate()
        {
            _photoView = new PhotoView() { BackgroundColor = Color.Gray };
        }