自定义 Wpf 列表框控件

发布于 2024-10-19 06:46:55 字数 162 浏览 3 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南城追梦 2024-10-26 06:46:55

此处查看默认控件模板您可以自定义滚动查看器来执行您想要的操作。查看下面的文章以开始使用

使用模板自定义 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

旧情勿念 2024-10-26 06:46:55

了解 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文