• Advertisement
Sign in to follow this  

How can PIX be used with WPF apps?

This topic is 2242 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone!

I’m planning a project that will require a nice UI. I’m thinking of using ribbon toolbars, which is why I probably need WPF (I know there are lightweight versions for WinForms, but I didn’t came across something that wasn’t buggy, missed important things or was slow…)
I’d like to use SlimDX (currently I only have the September 2011 release installed). So, I looked into the WPF samples of SlimDX and I got confused…

When I tried to debug any of the WPF samples (DX9 or 10 didn’t matter) PIX didn’t show up anything. The D3D area was plain white and hitting F12 had no effect. I read that some people somehow managed to get PIX to do at least something (they got crashes, though…).

So my question is: Is it possible to write WPF apps that use SlimDX to render Direct3D 11 content and can be debugged in PIX?

Thanks in advance, dear people!

Share this post


Link to post
Share on other sites
Advertisement
Hope this points you in the right direction -- I'm leveraging my knowledge of WPF, but have no experience with SlimDX or PIX (I do WPF pretty extensively for work).

There are some issues with WPF applications when not running in Administrator mode -- especially when referencing other libraries. It sounds stupid, but I've had some intensive third-party 3D controls not work when not in Administrative mode, mostly because they failed impersonation, etc, in .NET. Does the process you're trying to do work in WinForms? If so, have you considered hosting a WinForms control inside WPF? (http://msdn.microsoft.com/en-us/library/ms750944.aspx -- WindowsFormHost is the key here) It plays pretty well with WPF -- haven't had any issues with it when having to use legacy controls (except for minor issues caused by the legacy controls rendering poorly to begin with).

Also, you're much smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is much faster than WinForms, especially when you have a graphic card. On some controls I'd written for clients, I saw increases in speed for rendering by as much as 200 - 250%. Average was about 170 - 180% faster -- never saw anything actually render slower.

Share this post


Link to post
Share on other sites
Thank you very much Terin! smile.png


There are some issues with WPF applications when not running in Administrator mode -- especially when referencing other libraries. It sounds stupid, but I've had some intensive third-party 3D controls not work when not in Administrative mode, mostly because they failed impersonation, etc, in .NET.

The Administrator mode wasn’t the problem, but thanks for the tip. (I wouldn’t have thought of it in a million years.)


Does the process you're trying to do work in WinForms? If so, have you considered hosting a WinForms control inside WPF? (http://msdn.microsof...y/ms750944.aspx -- WindowsFormHost is the key here) It plays pretty well with WPF -- haven't had any issues with it when having to use legacy controls (except for minor issues caused by the legacy controls rendering poorly to begin with).

This sounds very promising, since I know it works with WinForms. I will definitely try that!

One feature of the framework should be, to let the 3D control be able to switch to fullscreen mode. This means, the WPF control that is currently hosting the 3D code isn’t used in that case. So, I was hoping that I could probably use PIX in full screen mode. Though, I haven’t had the time to test it yet. (This would be my fallback strategy. smile.png)


Also, you're much smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is much faster than WinForms, especially when you have a graphic card. On some controls I'd written for clients, I saw increases in speed for rendering by as much as 200 - 250%. Average was about 170 - 180% faster -- never saw anything actually render slower.

Interesting! This is very good to know. I haven’t had much the chance to familiarize myself with WPF. It’s good to approach new things. smile.png

Thanks again! smile.png

Share this post


Link to post
Share on other sites

Tsus, did you manage to get it working?

I still get that lame error and have 'temporarily' given up on PIX, but if you got it working, please do let me know what you did biggrin.png

I’ll let you know when I find a solution. I'll need PIX so I have to figure out a way. :)
Unfortunately, at the moment I barely have time to work on this project. I hope I can give it a try next week...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement