Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

c# - Transparent UWP windows 10

I am trying to figure out how to have a transparent background on the app, that lets the user see behind it. I've tried to change background and opacity parameters in xaml file, but nothing changed.

I have set a transparent image in background also

<Page.Background>
    <ImageBrush Stretch="Fill" ImageSource="Assets/fond.png"/>
</Page.Background>

But it doesn't work

Does anyone know how to perform this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

tl;dr https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic

You will be able to do it after the update of Windows 10 that is coming.

Here: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/8232264-enable-blur-and-transparency-xaml-effects-to-allow?tracking_code=8e9425d1ccc153460b32b85ed3253c90

And the github: https://github.com/Microsoft/WindowsUIDevLabs/tree/master/SampleGallery/Samples/SDK%20Insider/BlurPlayground

enter image description here

Maybe it's not the straight "see through", but I think it's what you would like to have.

EDIT: I think it is available in the SDK Preview, but I'm not sure because I didn't try it.

Info about Anniversary SDK Preview https://developer.microsoft.com/en-us/windows/downloads/windows-10-developer-preview

SDK is here https://insider.windows.com/

UPDATE:

I've just noticed prelease of CreateHostBackdropBrush() function in Compositor class. https://docs.microsoft.com/en-us/uwp/api/windows.ui.composition.compositor

UPDATE:

In Fall Creators Update it's even available as XAML code that's very fast and easy to write.

Link: https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...