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
670
Problems with xamDateTimeEditor
posted

Hi,

I dont seem to be able to set the foreground for a xamDateTimeEditor when it is embedded within another control, in my case, its set as the content of a radio button.

Also how do I prevent the XamDateTimeEditor from going into editmode when the control has IsReadOnly = True?

Thanks

Parents
No Data
Reply
  • 4618
    posted

    Hi aa_afolabi,

    Setting the foreground color of the XamDateTimeInput should work in both conditions where the control is used as the content of another control as well as when it is implemented on its own; also, setting the IsReadOnly property to true, will prevent editing of the control’s value via the editor.

    I have constructed a sample to demonstrate this behavior, where both behaviors are achieved; in this sample, I am implementing three discrete RadioButton controls which each have the XamDateTimeInput is used as their content, when any of the RadioButton’s are selected, their associated XamDateTimeInput will become both editable as well as having its foreground modified to red, when the RadioButton is unselected, the editor will become read only and will assume its default foreground color.

    ValueConverters were implemented to convert the IsSelected value of the RadioButton, which returns a color value for the ForeColor as well as an inverted bool which is passed to the IsReadOnly property of the editor.

    Please find the sample attached.

    If you have any further questions, please let me know.

    Sincerely,
    Chris K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support

    ModifyForegrndEmbeddControl117191.zip
Children