What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

WPF Window For Class Config

jeffgtx

New Member
Joined
Sep 4, 2010
Messages
49
Reaction score
1
Hello I was wondering if I could use a wpf window/page as the class config dialog window. The problem that I'm having is that the compiler doesn't look for that kinda thinking and I'm getting an error like such when trying to initialize my cc

File: ConfigWindow.xaml.cs Line: 28 Error: The name 'InitializeComponent' does not exist in the current context

There is a good article here that might shed some light on the problem that I'm having.
Hosting a WPF Control in a Windows Forms Application - MHender Rambles On - Site Home - MSDN Blogs.

Please tell me its possible to use a wpf window instead of those boring old winforms.
 
Hello I was wondering if I could use a wpf window/page as the class config dialog window. The problem that I'm having is that the compiler doesn't look for that kinda thinking and I'm getting an error like such when trying to initialize my cc

File: ConfigWindow.xaml.cs Line: 28 Error: The name 'InitializeComponent' does not exist in the current context

There is a good article here that might shed some light on the problem that I'm having.
Hosting a WPF Control in a Windows Forms Application - MHender Rambles On - Site Home - MSDN Blogs.

Please tell me its possible to use a wpf window instead of those boring old winforms.

We've wanted to allow WPF in CCs/plugins/etc, however, there's no reliable way to compile it at runtime, without a lot of headaches, and the usual bugs. So for now, we can't support WPF windows until MS decides to give us a way to properly compile them at runtime.
 
I was able to get the wpf window to load no problem (however no controls initialize)... the problem is just on the initialize method. Looks like you should be able to do with something like:

System.Uri resourceLocater = new System.Uri("/" + GetType().Assembly.GetName().Name + ";component/configwindow.xaml", System.UriKind.Relative);
System.Windows.Application.LoadComponent(this, resourceLocater);

But getting errors. Damn was really hoping to figure this out.
 
I was able to get the wpf window to load no problem (however no controls initialize)... the problem is just on the initialize method. Looks like you should be able to do with something like:

System.Uri resourceLocater = new System.Uri("/" + GetType().Assembly.GetName().Name + ";component/configwindow.xaml", System.UriKind.Relative);
System.Windows.Application.LoadComponent(this, resourceLocater);

But getting errors. Damn was really hoping to figure this out.

As I said, we don't support WPF yet. (We don't compile the XAML/BAML as an embedded resource)
 
Doing everything in procedural code(C#) works fine. It's how I did it in my Radar plugin.
 
Back
Top