![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| 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 | |||