the application continues executing after I precede "X" add ShutdownMode="OnLastWindowClose" and it has not worked for me yet
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TestAccesPdf" x:Class="TestAccesPdf.App"
StartupUri="MainWindow.xaml" ShutdownMode="OnLastWindowClose">
<Application.MainWindow>
<local:MainWindow/>
</Application.MainWindow>