A TextBlock cannot be made disabled (gray)

Editors for WPF Forum

Posted 4 months ago by Daniel Constantin - ModuleWorks GmbH
Version: 23.1.4
Avatar

Hi!

It is me or if I make a TextBlock IsEnabled=false does not change the color. I was expecting to be gray or something.

If I use a Label that seems to work.

Kind regards,

Daniel

[Modified 4 months ago]

Comments (2)

Answer - Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I don't believe the native WPF TextBlock control is set up to alter its appearance based on enabled state, and our themes don't provide any styles for TextBlock.  If you did want that behavior, you could make a Style that targets TextBlock and add in a trigger to alter the Foreground when disabled.


Actipro Software Support

Posted 4 months ago by Daniel Constantin - ModuleWorks GmbH
Avatar

Hi!

Thank you!

It would be great if in some future the TextBlock would work similar with the Label on this regard :)

Kind regards,

Daniel

The latest build of this product (v24.1.2) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.