字体颜色组合框 [英] Font color combobox

查看:98
本文介绍了字体颜色组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想学习如何将图像放入字体颜色/突出显示颜色组合框的标题中,例如,像Microsoft Office Word中的字体颜色和突出显示颜色组合框一样?还是它们有些复杂的组合框(带有按钮,列..)
我创建了带有彩色矩形的简单组合框
作为项目,当您选择一种颜色(文本框)时,它将应用于所选文本,并且所选矩形将显示在组合框的标题中.
我只想要像Microsoft Office Word中的字体颜色组合框一样的外观,该怎么做?
(对不起,我的英语!)

Xaml的一部分:

< local:mycombobox名称="MyFColorComoB" hieght ="26" width ="40" prekeydown ="MyFColorCB_PreKeyDown" xmlns:local =#unknown">

< comboboxitem>
< rectangle width ="20" stroke ="Black" height ="20" fill ="LightGray"/>
</comboboxitem>

< comboboxitem>
< rectangle width ="20" stroke ="Black" height ="20" fill ="Orange"/>
</comboboxitem></code>

</local:mycombobox>

Hi,
I want to learn how to put image inside font color/highlight color combobox''s header , for example, like the ones in Microsoft Office Word for font color and highlight color combobox? or are they somewhat complex comboboxes( with buttons, colomns..)
I created simple combobox with colored Rectangles
as items, when you select a color (textbox), it will be applyed on selected text and the selected rectangle will be shown in the header of the the combobox
I just want the apperiance of the font color combobox like the one in Microsoft Office Word, how to do this?
(Sorry for my English!)

part of Xaml :

<local:mycombobox name="MyFColorComoB" hieght="26" width="40" prekeydown="MyFColorCB_PreKeyDown" xmlns:local="#unknown">

<comboboxitem>
<rectangle width="20" stroke="Black" height="20" fill="LightGray" />
</comboboxitem>

<comboboxitem>
<rectangle width="20" stroke="Black" height="20" fill="Orange" />
</comboboxitem></code>

</local:mycombobox>

推荐答案

请参见

这篇关于字体颜色组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆