WPF中有预制调色板吗
我目前正在创建一个基本的文本编辑器,它具有更改字体和大小等基本功能。
我目前正在尝试添加颜色更改功能,我想知道默认库中是否已有任何预制调色板。我环顾四周,发现我可以下载预制调色板,但我想坚持使用默认的东西。
如果没有办法,我的备份计划就是将颜色名称加载到组合框中。
另外,我使用 .WPF 进行编码,并使用 C# 类中的方法通过 XAML 添加我的项目。
如有任何意见或建议,我们将不胜感激。
谢谢!
I am currently creating a basic text editor that has basic functions such as changing fonts and sizes.
I am currently trying to add color changing capibilities and I was wondering if there was any premade color pallettes already in the default libraries. I have looked around and have found that i can download premade palettes but i want to just stick to the default stuff.
If theres not a way my backup plan is just to load colour names into a combo box.
Also I am coding using .WPF and adding my items through the XAML with methods in C# classes.
Any comments or suggestions are appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“调色板”暗示了两件事:用于选择和/或混合颜色或完美搭配的颜色集合的控件。
对于第一个:http://www.google.nl/search?q=wpf +color+picker 有很多可供选择的。
要匹配颜色,请查看http://kuler.adobe.com/,它允许您创建一组或复制现有的匹配颜色集。
A 'palette' suggests two things: a control to select and/or mix a color or a collection of colors that go together nicely.
For the first: http://www.google.nl/search?q=wpf+color+picker there a lots to pick from.
For matching colors have a look at http://kuler.adobe.com/ it allows you to create a set or copy an existing matching set of colors.
System.Windows.Media.Colors
是一组众所周知的颜色。有关如何将它们加载到组合框中的示例,请参阅此 StackOverflow 答案:
There is
System.Windows.Media.Colors
which is a set of well known colors.See this StackOverflow answer for an example of how to load those into a combobox: