-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with Mica #6186
Comments
Try setting the window style to WS_EX_NOREDIRECTIONBITMAP. |
@nahomebssa Window does not have a style property, How should I set the style? |
He probably means the Win32 "Extended Window Style", which can be set during calling CreateWindow or be set by calling SetWindowLongPtr at runtime. For WinUI3, you can hardly change the behavior of CreateWindow, while SetWindowLongPtr doesn't support all styles. I'm not sure if it works for WS_EX_NOREDIRECTIONBITMAP. But it seems you should somehow set the background of ClientArea to transparency... Why WPF can handle it automatically? |
@jevansaks FYI, looks pretty interesting! |
@codendone FYI as well |
@seven-mile It doesn't, the example sets the background to transparent. Like you recommended, and is the exact thing WinUI 2 does. |
Window in WinUI 3 doesn't have Background property. How can I set it to transpararent? |
I think that's why Mica is still not out? |
I changed the Windows style as mentioned above but nothing happened😫 |
I read that this method may no longer be supported since Windows 11 Build 22494.1000? I can't confirm this myself though. |
Can't confirm on 22494 either, but it surely doesn't work for 22504+ |
@seven-mile FYI, Mica Sample available in WASDK-Sample Repo, but only for C++, can you convert it to c#? |
Doesn't look like it's going to work very well in WPF since it requires the use of a Visual layer, thus creating the airspace bug. |
You need to set the background of your application to transparent. You can do this via Win32 API calls. I have created a sample project here: https://github.com/IcySnex/WinUI3-Transparent-Mica-Acrylic-Blurred. |
That method depends on a private API that has been removed since 22494+ (in 22523 and later it's replaced. The proper way is to use |
I know Mica is not supported yet. However, with the help of some PInvoke functions, Mica is activated on WPF apps
so I tried to do the same in WinUI3 preview 3
TitleBar activates Mica well, but not Windows content
Is there a solution?😁
The text was updated successfully, but these errors were encountered: