MaterialDesign 控件属性(组合框)

MaterialDesign Control Properties (ComboBox)

我使用 MaterialDesign,我想更改 ComboBox 的弹出窗口 window 的外观。 我做了一些研究,然后在这里找到了它。

change combobox dropdown list background color wpf xaml

Miljac 的答案包含关键 MaterialDesignPaper。是否有这些密钥的文档? 没有通过 IntelliSense 向我提供密钥。

没有关于资源密钥及其使用位置的详细文档。但是,您可以查看 GitHub 存储库 Wiki. There is a page that lists all the brush names,但它不提供除此之外的任何信息。

如果想知道哪个控件使用了哪些画笔,可以查看弹出背景绑定的control style list. Pick the control style that you use and it will take you to the XAML style files, where you can identify the used brushes, e.g. for ComboBox see line 548 where MaterialDesignPaper is referenced and the subsequent lines from 553 on

IntelliSense 在涉及资源字典时不可靠,例如合并到应用程序资源和资源中,然后在自定义视图中使用。这些是 IntelliSense 的限制,资源可能在运行时完全可用。设计器也是一样,可能会报资源无法解析的警告,但实际上在运行时是可用的。