FontFamilyComboBox SelectedItemBox Font Color

Ribbon for WPF Forum

Posted 11 years ago by Tom Westerberg
Avatar
How am I able to change the foreground color on the FontFamilyComboBox?

If I set the foreground color directly, the color still doesn't change.

<Actipro:FontFamilyComboBox Width="135" Foreground="Black" Command="{x:Static Commands:MyCommands.FontFamily}" KeyTipAccessText="FF">

Thanks

Comments (10)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Tom,

I just tried this in our demo by setting the Foreground of the Home tab's font picker to Red and the text did show as red. Note this affects the editable text only and not the dropdown items.


Actipro Software Support

Posted 11 years ago by Tom Westerberg
Avatar
There must be something else going on with my control... It almost looks gray like the combobox is disabled, but when I highlight text it works properly, it just looks disabled.

I also tried setting the style to Style={x:Null} thinking that maybe it was being overriden, but that didn't work either.

I tried to look at the template in Blend to create my own style, but Blend doesn't want to seem to let me create a copy of the template. Is there a style template that you can provide that may work?

[Modified at 11/03/2008 12:49 PM]
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There is a trigger in the style that makes the text appear disabled if the control is disabled. Could that be happening via a command somehow in your app?

For the custom style, were you doing that to work around this issue? If so I'd prefer we sort this out and figure out what is wrong.

But if you wanted to create your own style from scratch using ours as a base, we're happy to send the default XAML to licensed customers.


Actipro Software Support

Posted 11 years ago by Tom Westerberg
Avatar
The trigger failing may be the problem. The issue occured after I upgraded from an older version.

What is the best way for me to troubleshoot this?
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Tom,

Can you make a simple repro of the problem and email it to our support address?


Actipro Software Support

Posted 11 years ago by Tom Westerberg
Avatar
I was able to use a style that we were using in another portion of the application to resolve the issue. It may be the foreground brush we were using was a static resource that was defined to match another combobox style. I thought that setting the foreground would override that, but it doesn't seem to. Something else may be going on, but I don't really have the time at the moment to troubleshoot it. Overriding the style will work fine for now.

Thanks for the help.

Tom
Posted 9 years ago by Ken Hanson
Avatar
I am also seeing the same problem. The text is white no matter if I set the foreground directly or via a Style setter for the type.

I did discover if the FontFamilyComboBox has IsEditable="False" then it shows black text.

This works for me, unfortunately the FontSizeComboBox has the same problem and I need to be able to type the font size.

So I am also looking for a solution here.

Best Regards,

Ken
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Ken,

Sorry but I'm not seeing any issues here. Can you email us a simple sample project that shows the issue? Please don't include any .exe files in your ZIP. Thanks!

Please also indicate which operating system you use and which theme is active.

[Modified at 05/13/2010 02:28 PM]


Actipro Software Support

Posted 9 years ago by Ken Hanson
Avatar
Dear Actipro,

I believe I have figured out the issue. I have a global type style for TextBox that is affecting your FontSizeComboBox control.

If I remove my Textbox Style then the problem goes away.

I don't know how to override affect the combo box internal to your control, as I need it to have a different style then the normal textboxes in my application.

Any suggestions?

Best Regards,

Ken
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Ken,

You could try one of these ideas to work around that:

1. Move your TextBox implicit Style to the Resources of the element that surrounds the main area of your window, but not the Ribbon control.

2. Add a new TextBox implicit Style to the Ribbon.Resources that is empty. This implicit Style would take precedence over your other one, and would prevent any properties from being changed.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.