Пример #1
0
        public void SdvAppbar()
        {
            ApplicationBar = new ApplicationBar();
            /*********** MENU ITEMS ***********/
            //ApplicationBarMenuItem item1 = new ApplicationBarMenuItem();
            //item1.Text = AppResources.SettingsPageTitle;
            //ApplicationBar.MenuItems.Add(item1);
            //ApplicationBarMenuItem item2 = new ApplicationBarMenuItem();
            //item2.Text = "Tutorial";
            //ApplicationBar.MenuItems.Add(item2);

            var item3 = new ApplicationBarMenuItem();

            item3.Text   = "Info";
            item3.Click += item3_Click;
            ApplicationBar.MenuItems.Add(item3);

            /*********** BUTTONs ***********/
            var button1 = new ApplicationBarIconButton();

            button1.IconUri = new Uri("/Images/back.png", UriKind.Relative);
            button1.Text    = AppResources.AppBarButtonToday;
            ApplicationBar.Buttons.Add(button1);
            button1.Click += delegate { scrollToToday(); };

            /*********** ADD METHODE BUTTON ***********/
            var button2 = new ApplicationBarIconButton();

            button2.IconUri = new Uri("/Images/add.png", UriKind.Relative);
            button2.Text    = AppResources.AppBarAdd;
            ApplicationBar.Buttons.Add(button2);
            button2.Click +=
                delegate { PocalAppointmentHelper.AddAllDayAppointment(App.ViewModel.SingleDayViewModel.TappedDay.Dt); };

            /*********** MONTHVIEW BUTTON ***********/
            var button3 = new ApplicationBarIconButton();

            button3.IconUri = new Uri("/Images/feature.calendar.png", UriKind.Relative);
            button3.Text    = AppResources.AppBarGoTo;
            ApplicationBar.Buttons.Add(button3);
            button3.Click += delegate
            {
                //NavigationService.Navigate(new Uri("/MonthView.xaml", UriKind.Relative));
                openMonthView();
            };
        }
Пример #2
0
        private void overviewAppbar()
        {
            ApplicationBar = new ApplicationBar();
            /*********** MENU ITEMS ***********/
            var item1 = new ApplicationBarMenuItem();

            item1.Text   = AppResources.SettingsPageTitle;
            item1.Click += delegate { NavigationService.Navigate(new Uri("/SettingsPage.xaml", UriKind.Relative)); };


            ApplicationBar.MenuItems.Add(item1);

            var item3 = new ApplicationBarMenuItem();

            item3.Text   = "Info";
            item3.Click += item3_Click;
            ApplicationBar.MenuItems.Add(item3);

            /*********** BUTTONs ***********/
            var button1 = new ApplicationBarIconButton();

            button1.IconUri = new Uri("/Images/back.png", UriKind.Relative);
            button1.Text    = AppResources.AppBarButtonToday;
            ApplicationBar.Buttons.Add(button1);
            button1.Click += delegate { scrollToToday(); };

            /*********** ADD METHODE BUTTON ***********/
            var button2 = new ApplicationBarIconButton();

            button2.IconUri = new Uri("/Images/add.png", UriKind.Relative);
            button2.Text    = AppResources.AppBarAdd;
            ApplicationBar.Buttons.Add(button2);
            button2.Click += delegate { PocalAppointmentHelper.AddAllDayAppointment(App.ViewModel.DayAtPointer.Dt); };

            /*********** MONTHVIEW BUTTON ***********/
            var button3 = new ApplicationBarIconButton();

            button3.IconUri = new Uri("/Images/feature.calendar.png", UriKind.Relative);
            button3.Text    = AppResources.AppBarGoTo;
            ApplicationBar.Buttons.Add(button3);
            button3.Click += delegate
            {
                //NavigationService.Navigate(new Uri("/MonthView.xaml", UriKind.Relative));
                openMonthView();
            };


            var button4 = new ApplicationBarIconButton();

            button4.IconUri = new Uri("/Images/cancel.png", UriKind.Relative);
            button4.Text    = AppResources.AppBarCloseOverview;
            ApplicationBar.Buttons.Add(button4);
            button4.Click += delegate
            {
                if (App.ViewModel.InModus == MainViewModel.Modi.OverView)
                {
                    toggleOverView();
                }

                agendaViewAppbar();
            };
        }