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
50
Issue with changing the style of XamPropertyGrid
posted

Hi!

I am having an issue with changing the style of the XamPropertyGrid.

I am using Infragistics 18.1.20181.324.

I took an example from the thread

https://www.infragistics.com/community/forums/f/ultimate-ui-for-wpf/110051/default-property-grid-editors

PropertyGridDefaultEditorsCase.zip

and according to the thread

https://www.infragistics.com/community/forums/f/ultimate-ui-for-wpf/108746/xampropertygrid-description-area-display-an-image

I added the generic.shared.xaml file.

This file is located under the C:\Program Files (x86)\Infragistics\2018.1\WPF\DefaultStyles\PropertyGrid

to the solution and merged the resource dictionaries

<ResourceDictionary Source="Themes\generic.xaml" />

in MainWindow.xaml.

Nothing else.

The original looks like this

When you hover over the items it is gray backcolor and black forecolor.

A selected item is blue backcolor and white forecolor.

The modified example, shows a gray backcolor and a black forecolor when you hover:

but as soon as you select an item the selected item has blue backcolor and white forecoler and all other items switch to white forecolor:

and hovering over the items:

I took a look at generic.shared.xaml  and the line which causes the troubles is in Style

PropertyGridPropertyItemView

line no. 771

<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="displayName"/>

if this line is commented the text stays black, but looks not so fine when it is selected:

I was not able to fix this myself.

Main intention is to adjust the some colors, some other visual items and the PropertyGridDescriptionAreaControl .

I've attached the modified project:

PropertyGridDefaultEditorsCase.zip

Thx, Christoph

Parents Reply Children
No Data