Changed app.xaml.cs file to work properly