Reputation: 2047
I'm trying to create a MAUI project from my existing forms project, and as part of it I created two resources files, one for colors and the other for styles, but it says that it cannot find the InitializeComponent method in it, I've tried cleaning bin, obj, restarting VS, creating new Resource files, but it is still giving the error
Any inputs would be really helpful
Upvotes: 0
Views: 88
Reputation: 13331
Usually, resources and styles are defined in *.xaml files without *.xaml.cs. Can you try adding a new ResourcesDictionary file and define your resources or styles there?
A ResourceDictionary file should look like this:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SampleApp">
</ResourceDictionary>
Upvotes: 0