示例#1
0
        public ResultsPage(string Tags)
        {
            InitializeComponent();

            //event handlers
            SearchTerms.Completed  += Search_Completed;
            ScrollContent.Scrolled += OnScrolledAsync;
            //
            CurrentSearch = new Booru(Settings.HostValue);
            if (CurrentSearch.ColCount != Results.ColumnDefinitions.Count)
            {
                AddColumn(CurrentSearch.ColCount);
            }
            Results.VerticalOptions   = LayoutOptions.StartAndExpand;
            Results.HorizontalOptions = LayoutOptions.CenterAndExpand;
            Results.Padding           = 2;
            //initial search results
            SearchTerms.Text = Tags;
            SubmitSearchAsync(Tags);
        }
示例#2
0
        public MediaPage(object sender, int index)
        {
            InitializeComponent();

            Search = (Booru)sender;
            Index  = index;
            Post   = Search.posts[Index];

            //Add Gesture
            var floatingMenuPan = new PanGestureRecognizer();

            floatingMenuPan.PanUpdated += OnFloatingMenuPan;
            UIContentLayers.GestureRecognizers.Add(floatingMenuPan);

            //Add Gesture
            var panGesture = new PanGestureRecognizer();

            panGesture.PanUpdated += OnMediaPan;
            UIContentLayers.GestureRecognizers.Add(panGesture);

            ReloadMediaPage();
        }