我是 extending the Aero glass frame进入客户区,想要放置a search box在扩展框架上,就像 Windows 资源管理器一样:
虽然默认的 WPF 文本框有一个灰色/蓝色边框,而不是屏幕截图上可以看到的深色、白色发光边框。 如何更改 WPF 文本框以使用与 Windows 资源管理器搜索框相同的样式?
最佳答案
这是我尝试在 WPF 中重新创建 Windows 资源管理器搜索框的外观:
它看起来不像原始版本 100%,但非常接近。
代码如下:
<Border BorderBrush="#40FFFFFF" BorderThickness="1" CornerRadius="2">
<Border BorderBrush="#80000000" BorderThickness="1,1,0,0" CornerRadius="2">
<Border BorderBrush="#30000000" BorderThickness="0,0,1,1" CornerRadius="2">
<Border BorderBrush="#F0FFFFFF" BorderThickness="1" CornerRadius="1">
<TextBox Background="#C0FFFFFF" BorderThickness="0"></TextBox>
</Border>
</Border>
</Border>
</Border>
关于c# - 带有 WPF 的 Aero 玻璃框架上类似 Windows 资源管理器的搜索框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1435245/