c# - 带有 WPF 的 Aero 玻璃框架上类似 Windows 资源管理器的搜索框

标签 c# wpf .net-3.5 windows-7 aero

我是 extending the Aero glass frame进入客户区,想要放置a search box在扩展框架上,就像 Windows 资源管理器一样:

Windows Explorer Search Box

虽然默认的 WPF 文本框有一个灰色/蓝色边框,而不是屏幕截图上可以看到的深色、白色发光边框。 如何更改 WPF 文本框以使用与 Windows 资源管理器搜索框相同的样式?

最佳答案

这是我尝试在 WPF 中重新创建 Windows 资源管理器搜索框的外观:

WPF solution compared to original

它看起来不像原始版本 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/

相关文章:

C# 3.0 - 对象初始值设定项

c# - 我有两个问题,其中一个是正则表达式

c# - 如何计算结构或类有多大?

c# - 在 ActionLink 中使用 ASP.NET MVC、Razor 页面的图标

c# - 如何在修正绑定(bind)属性后立即更新TextBox?

c# - WPF播放MediaElement暂停不停止视频

wpf - 将枚举类型绑定(bind)到文本框

c# - 替换字符串c#中的控制字符

c# - 在 ASP.NET MVC 5 Mono 中使用 Razor Url 助手时找不到方法 'RouteCollection.get_AppendTrailingSlash'

c# - WinForms 在没有 Form/UserControl 的情况下检索键盘状态