I am trying to load the xaml file in visual studio but its throwing an exception but when I run the app the design and all the functionality is absolutely fine. The exception is below :
InvalidCastException: Unable to cast object of type 'System.Windows.Application' to type 'Omnia.PIE.VTA.App'.
at Omnia.PIE.VTA.MainWindow.get_Instance()
at Omnia.PIE.VTA.Views.AccountHolderInfo.UserControl_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Sorry in advance but I am a total beginner in visual studio and after spending few hours I can't resolve it still.