Information générale
Catégorie:
Windows Presentation Foundation (WPF)
>In WPF, can I create a Window/Form and have other windows inherit from that master form? How?
You cannot create a derived window from a base type created using XAML. If the window is created purely via C# (or VB.NET) then it can be sub-classed.
>Can this also be done with the controls like buttons and grids?
Yes but again these must be created in code. If you do then the best plan is to define them in a separate assembly. You can then add relevant items from the assembly to the Toolbox.
That said, with WPF, you should never use base classes to impose any visual appearance on derived classes.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement