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 - Subsclassing System.Windows.Application

 
 
Old 05-23-2007   #1 (permalink)
Radek Cerny


 
 

Subsclassing System.Windows.Application

Hi,

I want to have a specific subclass of System.Windows.Application to use as
the basis for many WPF applications, but cant find a way to make the
generated (*.g.cs) code to emit the correct class and so I get compile
errors (the partial class I code is different from the staandard generated
System.Windows.Application)

eg:
public class MyApplication : Application

public partial class App : MyApplication


Am I missing something simple or is there no provision for this?

TIA

Radek



My System SpecsSystem Spec
Old 05-23-2007   #2 (permalink)
Radek Cerny


 
 

Re: Subsclassing System.Windows.Application

Sorry,
forgot to import the namespace. As long as you import the namespace of the
derived class (and its NOT part of the current project), simply changing the
XAML as follows does what I need....

<ns:MyApplication .....
xmlns:ns="clr-namespace:MyNamespace;assembly=myAssembly" //import namespace
from separate project!!!!

/>


"Radek Cerny" <radek.cerny@nospam.c1s.com.au> wrote in message
news:%23zJX6qPnHHA.4900@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I want to have a specific subclass of System.Windows.Application to use as
> the basis for many WPF applications, but cant find a way to make the
> generated (*.g.cs) code to emit the correct class and so I get compile
> errors (the partial class I code is different from the staandard generated
> System.Windows.Application)
>
> eg:
> public class MyApplication : Application
>
> public partial class App : MyApplication
>
>
> Am I missing something simple or is there no provision for this?
>
> TIA
>
> Radek
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Help: "i Windows Defender: A System Change Was Made by a Known Application" After System Start? Vista General
Can you run all 32 bit application in a 64 bit system running vista? General Discussion
System Inventory Application / WMI PowerShell
Detecting if an application is installed on a system .NET General


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