To change the base class, it is not enough to change it only in the code. You must also change the root tag and any nested elements in the accompanying XAML file. For example, you have something like:
<UserControl x:Class="Your.Namespace.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <UserControl.Resources> </UserControl.Resources> </UserControl>
You should change it to something like:
<Window x:Class="Your.Namespace.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Window.Resources> </Window.Resources> </Window>
source share