Wpf Show underneath blurry - c#

In wpf how can I make controls underneath a transparent control blurry like windows Aero?
I need this for my custom modal windows with a border in outside for locking mouse

You can use the pixel shader effects to mimic that effect. Here is a tool for building/testing pixel shaders.

Related

Transparent picturebox over another transparent picturebox c#

I'm having this problem. I would like for the frog's background to be transparent so the log underneath can be seen, but instead, the background picturebox's color is shown.
problem
I googled the problem and got the suggestion to change the Parent of the picturebox, which i tried, but this happened:
it works, but only in the log's picturebox area
I'm clearly doing something wrong. Can somebody help?
WinForms does not support true alpha-transparency. "Transparent" controls re-render only the parent form's background behind themselves - controls cannot be truely layered and blended in the Z-axis.
So what you're after really isn't possible.
However, implementing a game using WinForms controls and GDI (System.Drawing) is a bad idea - performance is terrible (in part due to Microsoft's crippling of GDI since Windows Vista by removing hardware acceleration of many operations) and there are endless issues with inconsistent double-buffering and DPI-scaling.
I suggest you rewrite your game's rendering layer in Unity, Direct2D or SDL.

Display WPF controls over OpenGL window in Windows desktop application

We're developing Windows desktop app with full-screen OpenGL graphics. Now we want to display a bunch of controls over the OpenGL (arrows, buttons, etc.) It turns out it is very difficult to do that.
The majority of tutorials suggest using WindowsFormsHost for OpenGL rendering, and we did so: http://www.codeproject.com/Articles/23736/Creating-OpenGL-Windows-in-WPF
Unfortunately now we cannot draw WPF controls over WindowsFormsHost, there's a lot of discussion about this all over the internet too: WindowsFormsHost is always the most top from WPF element
Render WPF control on top of WindowsFormsHost
There are some hacks that can work around this, but they all seem very dirty.
Is there a proper way to draw OpenGL directly in WPF without messing with Windows Forms? (I just have no idea why you cannot have this in WPF directly).
In short: is there a known solution for drawing UI over OpenGL in WPF applications?
Create a wpf window.
Render your opengl viewport in background.
Get the Snapshot of the opengl viewport and display the image in the WPF.
Transfer all UI Events on the WPF Image to the opengl viewport.
EDIT:
There is a way to host win32 window inside WPF window.
You can refer this video https://www.youtube.com/watch?v=JO4uW8Xb230.
If you are using GLFW for creating win32 window, you just need to use the underlying handle or just cast the window to HWND that WPF needs to host the window.

How to make a nice overlay with variable transparency using WinForms?

I'm looking for a way to make a WinForm transparent and allow to use semi-transparent images on it.
The common solutions are:
Changing the total opacity of the form and all of its content;
Make only a certain color fully transparent, while the rest will have to be fully opaque;
Use multiple forms to make only some controls transparent.
None of these ways allow to display images or controls which have variable per-pixel transparency value. And I'd like to achieve a cool interface like Steam does with its in-game overlay.
Is there maybe some video game technique that can be used to draw a nice overlay for the whole screen? It's okay if it will have to use 3D graphics drawing libraries and whatnot.

Vector Graphics in C# WinForms - should I interoperate with WPF?

I have a video camera that I'm interfacing with a C# app. The camera actually comes with a .NET WinForms control. It supports drawing on it with GDI+ functions.
When I zoom in, I need <1 pixel accuracy i.e. I want to draw a circle with a radius of less than two pixels. How can I draw vector graphics in WinForms? Is my best bet to overlay a WPF Canvas? I know I can use WPF controls in WinForm apps, but is it possible to make the background of a ElementHost/WPF canvas transparent and overlay it onto my video feed? Am I better off creating a WPF app, and only using this video control on the WindowsFormsHost provider?
Any other solutions of drawing vector graphics in C# apps?
Thanks in advance.
Well, unfortunately you won't be able to use WPF to overlay anything on your WinForms control due to airspace issues. Winforms and WPF content is not allowed to overlap inside the same window. You're stuck using vanilla GDI or another custom Winforms vector library.
MSDN Link to explanation of interoperability issues.

How can I show a grey transparent overlay in C#?

How can I show a grey transparent overlay in C#?
It should overlay other process which are not owned by the application doing the overlay.
Create a transparent window the size of the whole screen, mark it always-on-top, calculate the regions of your other application windows, and make the non-window regions of the top window grey.
I suppose you could just position your own application windows on top of the transparent grey one, with it being above all the other ones, but getting a tricky z-order scenario like that right, especially in conjunction with other apps that might also be doing z-order tricks, is tough.
Here a little app which do more or less the functionnality you want :
http://www.anappaday.com/downloads/2006/09/day-10-jedi-concentrate.html

Categories

Resources