title: Login Wpf ...is it right?
body: <p>i have a WPF Application with a LoginWindow to access,so i create a Splash Screen for this Login window as follow :</p>
  
  <p><strong>- in App.xaml</strong></p>
  
  <pre><code>&lt; Application x:Class="WPF.App"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Startup="Application_Startup"
      /&gt;
  </code></pre>
  
  <p>-<strong>in App.xaml.cs:</strong>  </p>
  
  <pre><code>      private void Application_Startup(object sender, StartupEventArgs e)
    {
           Login login = new Login();
          login.Show();
    }
  </code></pre>
  
  <p>-<strong>and in Login.xaml.cs if the log in is succesful :</strong></p>
  
  <pre><code>PrimaryWindow mainWindow= new PrimaryWindow ();
  
  Application.Current.MainWindow = mainWindow;
  
  this.Close();
  
  mainWindow.Show();
  </code></pre>
  
  <p>.This code is right but sincerely with my poor knowledge i don't know that's a good method to apply for a Login Window or not and i don't know if this method can be "dangerous" for my application that store data from a database and has many features , so i ask you if my way is good or not and if you have a better way can you suggest or show me that?</p>
  
  <p>Thanks for your attention.</p>
  
  <p>Have a lucky day. </p>