You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the Disabled state of the Controls looks inconsistent, excuse the term, with the default (grayed out) behavior.
This makes the Controls appear to be Active even if Disabled.
I investigated a bit and it seems to be due to the style defined for the TextBlock:
<! - Textblock ->
<Style TargetType = "{x: Type TextBlock}">
<Setter Property = "TextWrapping" Value = "NoWrap" />
<Setter Property = "TextTrimming" Value = "CharacterEllipsis" />
<Setter Property = "TextAlignment" Value = "Left" />
<Setter Property = "Foreground" Value = "{StaticResource ControlDefaultForeground}" />
</Style>
As I understand it, the TextBlock is implicitly used for the ContentPresenter of the various Controls and therefore its Foreground overwrites the color that You had foreseen (ControlDisabled ...).
After some research I found what appears to be the solution:
use the Opacity Property of the Control instead of setting the properties of the various components defined in the ControlTemplate:
<Style.Triggers>
<Trigger Property = "IsEnabled" Value = "False">
<Setter Property = "Opacity" Value = ". 5" />
</Trigger>
</Style.Triggers>
In this way it seems to me that the result is better
The text was updated successfully, but these errors were encountered:
hello Angry
I noticed that the Disabled state of the Controls looks inconsistent, excuse the term, with the default (grayed out) behavior.
This makes the Controls appear to be Active even if Disabled.
I investigated a bit and it seems to be due to the style defined for the TextBlock:
As I understand it, the TextBlock is implicitly used for the ContentPresenter of the various Controls and therefore its Foreground overwrites the color that You had foreseen (ControlDisabled ...).
After some research I found what appears to be the solution:
use the Opacity Property of the Control instead of setting the properties of the various components defined in the ControlTemplate:
In this way it seems to me that the result is better
The text was updated successfully, but these errors were encountered: