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
1540
Transparent XamMaskedEditor doesn't automatically adjust its Foreground when set against dark background
posted

I am using both XamTextEditor and XamMaskedEditor in a container control (Xceed DataCell) that changes its background colour depending on whether it is in edit mode or not.  To not obscure this background effect, I have set the Background of the XamTextEditor and XamMaskedEditor controls to Transparent.

However, it seems that XamTextEditor automatically adjusts its Foreground according to the containing control's background colour, but XamMaskedEditor does not.  This is particularly prominent in when using 'Windows XP' theme/style with the colour scheme set to 'Default (blue)'.

I tried putting the XamTextEditor and XamMaskedEditor controls on another control (a StackPanel) with its Background set to DarkBlue, but neither of the controls' Foreground changed to white; both remained black.  So, it appears that the DataGrid is "telling" the editor control to change its Foreground, but it is not doing so on the XamMaskedEditor for some reason.  Is this a failure on the part of the DataGrid or does the XamMaskedEditor not conform to some requirement?

I've attached an example project demonstrating this.  Simply set your Display Settings to use 'Windows XP' theme, colour scheme 'Default (blue)' and then run the application.  Click 'New Item' and type into both cells.  The first one (which uses XamTextEditor) automatically provides a clear white Foreground against the dark blue background.  The second one (which uses XamMaskedEditor) shows the standard black Foreground which is difficult to see against the dark blue background.

Unfortunately, I could not include the third-party DLLs in the attachment due to size limitation, so, as you have done previously, you will need to download and install Xceed DataGrid for WPF 3.7 control suite from  here  (site registration may be required).

This appears to be a bug with the XamMaskedEditor.  Is there a workaround?  Can this be submitted as a fix request?

Thanks,

Jason

XamMaskedEditor Bug.zip
Parents
No Data
Reply Children
No Data