private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox listBox = (ListBox)sender;

            switch (listBox.SelectedIndex)
            {
            case (0):
                MainAppFrame.Navigate(typeof(Views.Page1));

                break;

            case (1):
                MainAppFrame.Navigate(typeof(Views.Page2));

                break;

            case (2):
                MainAppFrame.Navigate(typeof(Views.Page3));
                break;

            case (3):
                MainAppFrame.Navigate(typeof(Views.Page4));
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        public void AddCommands()
        {
            NavigationCommands.Add("MainMenu", new RelayCommand(() =>
            {
                MainAppFrame.Navigate(typeof(Views.Domain.MainMenu));
            }));

            NavigationCommands.Add("OpenEmployeeView", new RelayCommand(() =>
            {
                MainAppFrame.Navigate(typeof(EmployeeView));
            }));

            NavigationCommands.Add("OpenPayCheckView", new RelayCommand(() =>
            {
                MainAppFrame.Navigate(typeof(Views.Domain.PayCheckView));
            }));


            //NavigationCommands.Add("Login", new RelayCommand(() =>
            //{
            //    MainAppFrame.Navigate(typeof(Login));
            //}));

            //NavigationCommands.Add("OpenSaleView", new RelayCommand(() =>
            //{
            //    AppFrame.Navigate(typeof(SaleView));
            //}));
        }
Exemplo n.º 3
0
        private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox lb = sender as ListBox;

            switch (lb.SelectedIndex)
            {
            case 0:
            {
                MainAppFrame.Navigate(typeof(Pages.Page1));
                break;
            }

            case 1:
            {
                MainAppFrame.Navigate(typeof(Pages.Page2));
                break;
            }

            case 2:
            {
                MainAppFrame.Navigate(typeof(Pages.Page3));
                break;
            }
            }
        }
 public MainPage()
 {
     this.InitializeComponent();
     MainAppFrame.Navigate(typeof(Views.Page1));
 }