Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamDateTimePicker text color


How can I change the text color of a disabled XamDateTimePicker?

Currently trying this without any luck

 <Style TargetType="editors:XamDateTimeInput">
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="igPrim:MaskedInputTextBox.Foreground" Value="Black"/>

Thank you

  • 28750
    Verified Answer
    Offline posted

    Hello PMac,

    I have been investigating into this behavior that you are seeing, and I would expect that the Trigger that you are using should work in this case if you simply target the "Foreground" property rather than the "igPrim:MaskedInputTextBox.Foreground" property. Although, I would expect that the setter that you have in that Trigger should work as well.

    Out of curiosity, have you explicitly set the Foreground property on your XamDateTimeInput? If so, that property will "win" and the trigger will be ignored in this case. If you add a setter for the Foreground property in the Style instead, you will be able to see your Trigger respected.

    I am attaching a sample project that demonstrates usage of the IsEnabled foreground trigger in the XamDateTimeInput.

    Please let me know if you have any other questions or concerns on this matter.