Posted 2 years ago
by Guillaume Guimond-Croteau
Version: 19.1.3
Platform: .NET 5.0
Environment: Windows 11 (64-bit)
Hi,
I am trying to modify the PropertyStyle, but I can't manage to modify the Margin of the AdvancedTextBlock. Here is the code:
<grids:PropertyGrid.ItemContainerStyleSelector>
<grids:PropertyGridItemStyleSelector>
<grids:PropertyGridItemStyleSelector.PropertyStyle>
<Style TargetType="grids:PropertyGridItem">
<Style.Resources>
<Style TargetType="shared:AdvancedTextBlock">
<Setter Property="Margin" Value="0" />
<Setter Property="Foreground" Value="Blue" />
</Style>
</Style.Resources>
</Style>
</grids:PropertyGridItemStyleSelector.PropertyStyle>
</grids:PropertyGridItemStyleSelector>
</grids:PropertyGrid.ItemContainerStyleSelector>
To test that the TargetType works I also changed the foreground color. It changed correctly, but the margin is still not changing from the orininal 5,3,1,3. Is it a bug or is there something I can do to work around this?
[Modified 2 years ago]