Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

g.i.cs class keeps changing its base class back to its default

g.i.cs class keeps changing its base class back to its default

System.Windows.Controls.Page

After I've changed it to

System.Windows.Controls.UserControl

I need it to be a UserControl because the other partial class' base class is a UserControl

After compiling I get the message

"...file.g.i.cs This file has been modified outside of the source editor. Do you want to reload it?"

If I say no, I can compile, but after a while, it switches back again. If I choose yes, it instantly switches back.

Any ideas?

Oh, and no one else is working on the files :-)

like image 944
Since_2008 Avatar asked Dec 28 '22 17:12

Since_2008


1 Answers

Look at the beginning of your XAML. You will see a tag that opens with ... change that to and then do the same for the closing tag at the bottom.

You may also have to update your code behind file to make sure the class it defines isn't explicitly derived from the wrong thing.

like image 101
Robert Levy Avatar answered Feb 01 '23 06:02

Robert Levy