# WPF Application status/help



## MisterIXI (Oct 28, 2016)

Hello,

Currently, I am coding a program for my speedrun community in Visual Studio (a WPF application). Since I'm new to WPF apps, I was orienting quite a bit on an existing open source program serving a similar purpose. That is (as far as I can tell) a WPF Application written in Visual studio as well. 
(That program is called Livesplit)

I have come quite far with my program now, but I noticed that OBS is not picking up my program in window capture mode at all. After searching this forum and google for answers I found pretty much only this thread: https://obsproject.com/forum/threads/wpf-applications-window-capture-not-working.9522/

Has OBS changed something in that regard or is that still not working? The compatibility modes in OBS Studio and Classic only fix the cursor glitching out, and the recorded footage remains pitch black.

Or is there maybe a workaround for me as the developer of the WPF app to change how it was rendered or something? 

I think the program I'm learning from just has his own "component renderer" and probably that's why it doesn't have any problems...

Btw: I'm on Windows 10 and have the exact same behavior on OBS classic and Studio 

Thanks in advance for any Help or Pointers you guys can give me.


----------



## Jim (Oct 28, 2016)

WPF programs use a specific render technique to composite the window that can't be captured by normal window capture.  It's quite annoying.  Feels like the only workaround that could be programmed currently is some sort of pre-loaded hook (ala game capture) that prevents the window from using that render technique and use the old one instead.

I might also be able to write something in to game capture that allows it to capture WPF applications like you would a game, but I'm not sure if it'll work.  I'll have to try it.


----------



## Jim (Oct 28, 2016)

Wait a second I made a quick WPF application and it worked fine.  Could you tell me specifically if there's anything you're using with WPF?  Like graphics or some sort of special drawing or anything?


----------



## MisterIXI (Oct 28, 2016)

Erm I am using Transparancy on Image objects I have. I also have a "Rectangle" used to draw a line in the program. Otherwise I have only used Labels which get updated by a Timer. 
Oh, and a color gradient in the background. 

I can also upload the whole project if that helps.


----------



## Jim (Oct 28, 2016)

You might have to.  I can't seem to replicate.  How do you do your color gradient?


----------



## Jim (Oct 28, 2016)

Ah I see how to create the gradient for a background, though I still can't replicate.  Feel free to PM me with it.  I'm going to be gone for a bit but I'll take a look at it when I get back.


----------



## MisterIXI (Oct 28, 2016)

I do the color gradient in the properties window of my Main Window (Brush section and then set Background as a gradient)

I have included my whole project folder as a zip (there's also the compiled program in debug).

Edit: Also I should maybe note that the program is not really functional yet and I will add stuff like right click menus and maybe make it resizeable down the road. (If that changes anything in the regard of OBS )


----------



## Jim (Oct 29, 2016)

So I figured this out, it's caused by the "Allow Transparency" option in the properties of the main window.  If you turn it off, it captures again.  I guess it just changes the render technique for the window.


----------



## MisterIXI (Oct 29, 2016)

It works! Thank you very much for the quick help!


----------

