示例#1
0
        /// <inheritdoc />
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var shell  = new Shell();
            var window = new ShellWindow
            {
                DataContext = new ShellViewModel(shell)
            };

            window.ShowDialog();
        }
 private void Services_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     //if statement to prevent endless loop caused by UnselectAll() causing a slectionChanged event
     if (services.SelectedItem != null)
     {
         //Might be changed to page with navigation in frame
         ServiceEditView SEV    = new ServiceEditView();
         ShellWindow     window = new ShellWindow();
         window.WindowState = WindowState.Normal;
         window.Content     = SEV;
         window.ShowDialog();
         window.Height = 450;
         window.Width  = 900;
         services.UnselectAll();
         //Unselect current item so that a selection changed does not happen again
         //when exiting and re-entering the find customer page
     }
 }
 private void machines_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     //if statement to prevent endless loop caused by UnselectAll() causing a slectionChanged event
     if (machines.SelectedItem != null)
     {
         //Might be changed to page with navigation in frame
         OrderCreateViewModel CEV    = new OrderCreateViewModel();
         ShellWindow          window = new ShellWindow();
         window.WindowState           = WindowState.Normal;
         window.Content               = CEV;
         window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         window.ShowDialog();
         window.Height = 450;
         window.Width  = 900;
         machines.UnselectAll();
         //Unselect current item so that a selection changed does not happen again
         //when exiting and re-entering the find customer page
     }
 }