Completed
Last Updated: 12 Jan 2016 06:42 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 04 Dec 2015 15:00
Category: PropertyGrid
Type: Bug Report
6
FIX. RadPropertyGrid - when switching from one light theme to a dark one, e.g. VisualStudio2012Dark, editors have white color and the text has the same fore color
To reproduce: use the following code snippet and refer to the attached gif file:

 public Form1()
 {
     InitializeComponent(); 
     this.radPropertyGrid1.SelectedObject = this;
 }

 private void radButton1_Click(object sender, EventArgs e)
 {
     ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Dark";
 }

 private void radButton2_Click(object sender, EventArgs e)
 {
     ThemeResolutionService.ApplicationThemeName = "ControlDefault";
 }


Workaround:

private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
    PropertyGridTextBoxEditor editor = e.Editor as PropertyGridTextBoxEditor;
    if (editor != null)
    {
        BaseTextBoxEditorElement el = editor.EditorElement as BaseTextBoxEditorElement;
        if (el != null)
        {
            el.BackColor = Color.Black;
        }
    }
}
Attached Files:
0 comments