Closed Jules196 closed 3 months ago
Current workaround to add Style elements: ` public MyView() { InitializeComponent(); propGrid.Loaded += PropGrid_Loaded; }
private void PropGrid_Loaded(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
foreach (var c in (propGrid.Content as Grid)!.Children)
{
if (c is Grid gridLv1 && gridLv1.Name == "propertiesGrid")
{
foreach (var c2 in gridLv1.Children)
{
if (c2 is Expander exp && exp.Content is Grid gridLv2)
{
gridLv2.RowDefinitions.ForEach(f => f.Height = GridLength.Auto);
foreach (var c3 in gridLv2.Children)
{
if (c3 is TemplatedControl tp)
{
tp.FontSize = propGrid.FontSize;
tp.FontFamily = propGrid.FontFamily;
tp.FontStretch = propGrid.FontStretch;
tp.FontWeight = propGrid.FontWeight;
tp.Foreground = propGrid.Foreground;
}
}
}
}
}
}
}`
Would it be great if there are Styleproperties for PropertyName, PropertyValue and Grouping Header?
I am using version 11.0.6.2 of the PropertyGrid libary and version 11.0.10 of Avalonia. I want to set the fontsize like the following: <ScrollViewer Grid.Column="0" Grid.Row="1" FontSize="11"> <propGrid:PropertyGrid Name="propGrid" AllowFilter="False" ShowTitle="True" AllowQuickFilter="False" DataContext="{Binding Config}">