Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To: Subclass User Control
Message
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Titre:
How To: Subclass User Control
Divers
Thread ID:
01470880
Message ID:
01470880
Vues:
139
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform