Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Subclassing Window

 
 
Old 03-27-2007   #1 (permalink)
Aidan Reel


 
 

Subclassing Window

Hi

I am attempting to create a small framework which requires each window to be
a subclass of 'MyAppWindow' rather than Window. MyAppWindow is a subclass of
Window.

I am getting a compile error stating:

Partial declarations of XXXX must not specify different base classes

I believe this is raised due to the generated code in mainwindow.g.cs which
declares the window classes as being derived from System.Windows.Window.

My question: Where can I indicate to VS that the default window superclass in
not System.Windows.Window but another derived class from Window?

Regards

My System SpecsSystem Spec
Old 03-27-2007   #2 (permalink)
Laurent Bugnion [MVP]


 
 

Re: Subclassing Window

Hi,

Aidan Reel wrote:
> Hi
>
> I am attempting to create a small framework which requires each window to be
> a subclass of 'MyAppWindow' rather than Window. MyAppWindow is a subclass of
> Window.
>
> I am getting a compile error stating:
>
> Partial declarations of XXXX must not specify different base classes
>
> I believe this is raised due to the generated code in mainwindow.g.cs which
> declares the window classes as being derived from System.Windows.Window.
>
> My question: Where can I indicate to VS that the default window superclass in
> not System.Windows.Window but another derived class from Window?
>
> Regards


See this:
http://geekswithblogs.net/lbugnion/a...02/107747.aspx

Please feel free to ask if anything is unclear.

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
VS2005 Basic Hangs when changing from Code window to Design Window .NET General
Window Security Window keeps popping up on Microsolf Mail? Vista mail
UAC Prevents Subclassing IE7 Main Window Vista security
[Windows Photo Gallery] Subclassing Vista General
Owned window errantly made a topmost window. Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46