Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Subsclassing System.Windows.Application

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-23-2007   #1 (permalink)
Radek Cerny
Guest


 

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
Guest


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
System / Application sounds not working Mike from OZ Vista General 3 05-29-2008 08:52 PM
Detecting if an application is installed on a system Greg Smith .NET General 5 05-06-2008 10:45 AM
disable file system virtualization for an application Scott Vista General 4 03-14-2008 12:24 PM
Windows Application vs XAML Browser Application Denis Avalon 0 04-20-2007 01:43 AM
Possible bug in System.Windows.Application: Windows property Jason Dolinger Avalon 1 01-10-2006 03:54 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51