Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: Subclass User Control
Message
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
How To: Subclass User Control
Miscellaneous
Thread ID:
01470880
Message ID:
01470880
Views:
138
I'm trying to create a user control that I can use as a base for other user controls. So created this:
public abstract partial class _ViewBase : UserControl
{
    public _ViewBase()
    {
        InitializeComponent();
    }

    public abstract void Add();
    public abstract void Edit();
    public abstract void Remove();
    public abstract void Save();
}
The I get the comp error:
Partial declarations of 'UserView' must not specify different base classes
So I Googled it, found and followed this: http://geekswithblogs.net/lbugnion/archive/2007/03/02/107747.aspx

Now I get:
"_ViewBase" cannot be the root of a XAML file because it was defined using XAML. 
How in the world do you subclass a user control in WPF???
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform