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
325
Is it possible to change background color in XamPropertyGrid?
posted

Is it possible to change background color in XamPropertyGrid?
We confirmed that if you simply set Background = white, the background color of XamPropertyGrid itself does not change.

My theme is 2013 Office.
I want to change the background. If there is no content in Property, the entire thing appears gray. I would also like to ask if it is possible to specify category colors separately.

And is it possible to handle Category and DisplayName in multiple languages right away in the bound class?

Parents
No Data
Reply
  • 1700
    Offline posted

    Hello, 

    The theme could be modified by including the relevant theme files and their dependencies from the following directory with Infragistics controls installed: 

    C:\Program Files (x86)\Infragistics\<version>\ WPF\DefaultStyles\PropertyGrid 

    You will need to include the contents PropertyGrid directoryand its dependencies from the same folder. By doing this, you can then modify them and then create an entry in your App.xaml for your application like so: 

        <Application.Resources>

            <ResourceDictionary>

                <ResourceDictionary.MergedDictionaries>

                    <ResourceDictionary Source=" Theme/generic.xaml" />

                </ResourceDictionary.MergedDictionaries>

            </ResourceDictionary>

        </Application.Resources> 

    In order to change the background color of both the XamPropertyGrid and the PropertyGridItemLayoutPanel, which holds all the items, you could either change the background property of the XamPropertyGrid or the value of the PropertyGridBackgroundBrush and the background proeprty igPrim:PropertyGridItemLayoutPanel or the value of the PropertyItemLayoutPanelBackgroundBrush. 

    I am attaching a small sample that has changed the PropertyGridBackgroundBrush and the PropertyItemLayoutPanelBackgroundBrush values to orange. 

    Regarding changing the language of the Porperty grid I recommend you reviewing the following blog that explains in detail how this could be achieved: 

    https://ko.infragistics.com/community/blogs/b/blagunas/posts/localize-property-names-descriptions-and-categories-for-the-xampropertygrid 

    Please let me know if you need any further assistance. 

    Regards,
    Ivan Kitanov

    3683.PropertyGridDefaultEditorsCase.zip

Children
No Data