Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在现有控件的顶部画一条线,但它将颜色混合在一起。我找到的只是关于如何制作精美混合模式的教程,但我想要的只是在我的控件上画一条纯色线,但即使是solidColorBrush 的行为也不像我想要的那样。
您是否在画笔上设置了不透明度设置?
编辑 我看了看,显然不透明度似乎是累积的,因为你通过控件继承。
请参阅此链接,他将不透明度应用于按钮内容和按钮本身。您可以按照您发布的 SO 链接的建议来删除父对象的不透明度吗?