I've first tried the following grid-level XAML code, requesting the entire grid to be read-only:
<propgrid:PropertyGrid Name="propGrid"
Grid.Row="0" Height="Auto"
HorizontalAlignment="Stretch"
Margin="10,10,10,0"
VerticalAlignment="Stretch"
IsSummaryVisible="False"
IsReadOnly="True"
Width="Auto">
</propgrid:PropertyGrid>
with the following C# code for each property grid item:
String itemValue = "...";
PropertyGridPropertyItem item = null;
item = new PropertyGridPropertyItem();
item.Name = "applicationVersion";
item.DisplayName = "Application version";
item.ValueType = typeof(String);
item.DefaultValue = itemValue;
item.Value = itemValue;
item.IsReadOnly = false; // Overrides the name cell's color, but not the value cell (remains read-only)
//item.IsReadOnly = true; // Both name/value cells remain read-only
propGrid.Items.Add(item);
...
If the XAML code has IsReadOnly="False", then each item's IsReadOnly property can be adjusted accordingly. However, in both cases, the grey color makes the grid content half legible. I would like to change this grey color for each name/value cells to specific colors. Each property grid item does not have any Color properties. I don't know what the Style property value should be set to.
I don't know if this related question should be in a new post, but is it possible to prevent any editing events from firing for an item, in order to emulate a Read-Only scenario, and thus prevent the greying of the colors?