コード例 #1
0
        public ObservationDetailsPage(Models.SummaryObservation summaryObservation)
        {
            if (Device.RuntimePlatform == Device.Android)
            {
                NavigationPage.SetHasNavigationBar(this, false);
            }

            this.summaryObservation = summaryObservation;
            InitializeComponent();
        }
コード例 #2
0
        private Controls.ContentPresenter BuildObservationPresenter(DataTemplate template, Models.SummaryObservation observation)
        {
            Controls.ContentPresenter presenter = new Controls.ContentPresenter()
            {
                BindingContext = observation,
            };
            presenter.ItemTemplate = template;
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();

            // TODO: Change device tapped to go somewhere else?
            tapGestureRecognizer.Tapped += Observation_Tapped;
            presenter.GestureRecognizers.Add(tapGestureRecognizer);
            return(presenter);
        }