I would like to have my own application class that inherits from System.Windows.Application. The problem is that in the Application.xaml file I have to declare the application as follows:
<src:MyBaseApplication x:Class="MyApplication"
xmlns:src="clr-namespace:MyApplication;assembly=WpfTestApplication"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="FPrincipal.xaml">
<Application.Resources>
</Application.Resources>
</src:MyBaseApplication>
It works fine at runtime, but when I edit the project properties, I get the following error message using the Visual Studio project properties editor:
An error occurred while loading the application definition file for this project. The file '[...] \ Application.xaml' could not be parsed. Please edit the file in the XAML editor to fix the error. Could not find the expected root Application element in the application definition file.
The project is a VB.NET project. Does anyone have a workaround? I want to save the application.xaml file.
thanks
Karol deland
source
share