自定义 Wpf 列表框控件
我是 wpf 的新手,刚刚获得一个项目来创建一组自定义控件,这些控件将用于使以前的 Windows 窗体应用程序更易于管理和更新。然而,我似乎找不到关于自定义内置列表框的太多信息,这最好涉及用自定义图像等替换滚动条和+/-按钮。
只是想知道是否有人知道如何获取这些?
提前致谢。
I'm new to wpf and have just been given a project to create a set of custom controls which will be used to make a previous windows forms application more manageable and current. However I cannot seem to find much info with regards to customising the built in Listbox, this would involve preferably replacing the scroll bar and the +/- buttons with custom images etc..
Just wondered if anyone knows how to get at these ?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在此处查看默认控件模板您可以自定义滚动查看器来执行您想要的操作。查看下面的文章以开始使用
使用模板自定义 WPF 控件
Check here for the default control template of the listbox.You can customize the scrollviewer there to do what you are looking for.Check the below article to get started
Using Templates to Customize WPF Controls
了解 WPF样式和模板。除此之外,这个问题对于SO来说太笼统了。阅读这篇文章(也许还可以在谷歌上搜索更多有关该主题的文章),尝试设置列表框的样式并返回具体问题。 WPF 并不容易入门,但绝对值得花时间。
Learn about WPF styling and templating. Other than that, the question is too generic for SO. Read the article (and perhaps google some more articles on the topic), try to style the listbox and come back with specific issues. WPF is not easy to get into, but it is definitely worth the time.