当前位置:网站首页>Using XAML only to realize the effect of ground glass background panel
Using XAML only to realize the effect of ground glass background panel
2022-06-21 07:14:00 【Bullseye】
For some reason , In a wpf I want to make a frosted glass effect in my application Panel, Put some picture buttons on it , And then superimposed on a listbox( The content is pictures ) On . I think it will be pretty good .
I spent some time on the Internet , The feeling is quite complicated , I still have to write c# Code . I think I should only write xaml That's enough , No resources found , Just write it yourself .
Refer to some information , I think the key lies in this Panel The background of the need to refer to another Panel Image and do blur operation .
Refer to another Panel In fact, the image is to put their own background Visual binding To that Panel On .
Find out which container can contain Visual and Effect, So you can do the background . by the way , Use Border‘!
<Border.Background>
<VisualBrush Stretch="Uniform" Visual="{Binding ElementName=targetPanelName}"/>
</Border.Background>
<Border.Effect>
<BlurEffect Radius="50"></BlurEffect>
</Border.Effect>To do that, you need a ground glass background Panel, Adjust the size , Location , Set this Panel The background is Transprent.
According to this Panel The location of , size , Set up Border.Clip
<Border.Clip>
<RectangleGeometry Rect="0,0,200,200"/>
</Border.Clip>And then OK 了 ! well , It's quite simple !

No need, no need Panel Drag and drop , But it should not be difficult , Modify this in the code Border.Clip Just fine .
resources :https://download.csdn.net/download/bullseye/12404719
边栏推荐
- Do you know all the extension racks of ThinkPHP?
- Google Earth Engine(GEE)——全球农田有机土壤碳和氮排放(1992-2018年度)数据集
- Microphone loading animation
- 基于Flexsim的供应链建模与仿真课程设计
- 微信小程序_4,WXSS模板样式
- [flutter special topic] 72 graphic minimalist custom running lamp acemarquee yyds dry goods inventory
- [GNN] Application of GNN neural network toolbox and MATLAB simulation
- Debezium报错处理系列之十八:解决无法获取表结构问题
- Geo2r: difference analysis of data in geo database
- How to use MES management system to realize error prevention and early warning
猜你喜欢

微信小程序_3,WXML模板语法

IDM移动端功能升级说明

Bol Bohr's original dual currency driving model leads the new hotspot of dfi+nft+web3.0

Four necessary steps for building a digital factory

Eigen 常用操作

【GNN】GNN图神经网络工具箱的应用和matlab仿真

Ztmao theme cat WordPress Theme classic lost version /wp website template download station source code + global SEO function setting

数学是用于解决问题的工具

Wechat applet_ 5. Global configuration

Configuring the eigen3 development environment for vs2017 on win10
随机推荐
【osg】OSG开发(03)——构建MSVC版的osgQt库
MySQL MHA
What is Eureka? What can Eureka do? How does Eureka work?
Feature scaling for machine learning
Two column set (map set)
Four necessary steps for building a digital factory
Two ideas of I2C driver implementation (I2C dev.c and I2C core.c)
Tensorrt笔记(三)参考整理
Pinia advanced: elegant setup (functional) writing + encapsulation into your enterprise project
App Safety Penetration Test detailed Method Flow
Lnc2Meth:与疾病相关的lncRNA上的甲基化位点
Google Earth engine (GEE) - Global farmland organic soil carbon and nitrogen emissions (1992-2018) data set
Yield guild games and Walken reach cooperation
C language program design - Sanzi chess (semester homework)
Pyg tutorial (6): customizing the messaging network
从 Stream 到 Kotlin 再到 SPL
X86 CPU access DRAM and PCI
企业级开发使用POI踩坑盘点
微信小程序_3,WXML模板语法
2022 运维故障案例经验