Esempio n. 1
0
 /// <summary>
 /// Method that is called when the hardware back button is pressed.
 /// </summary>
 /// <returns></returns>
 protected override bool OnBackButtonPressed()
 {
     // Navigate to the calendar page and suppress the back request
     RecordBookTabbedPage.NavigateTo(
         RecordBookTabbedPage.TabbedPageOption.CalendarPage);
     return(true);
 }
Esempio n. 2
0
        /// <summary>
        /// Default constructor for the tabbed page.
        /// </summary>
        public RecordBookTabbedPage()
        {
            // Initialize the component and set the current date
            RecordBookTabbedPage.SelectedDate = DateTime.Today;

            // Set the bar color if this is an Android device
            if (Device.RuntimePlatform == Device.Android)
            {
                this.BarBackgroundColor = (Color)
                                          Application.Current.Resources["ApplicationGreen"];
            }

            // Initialize the component
            InitializeComponent();
            this.OnAppearing();

            // Set this as the current instance
            RecordBookTabbedPage.Instance = this;
        }