Skip to content

Accessing Nested Cells in Avalonia Property Grid: Difficulty Modifying Content Below Category Children #20

Discussion options

You must be logged in to vote

I solved this problem.

Firstly, create a button cell edit factory.
And button contains cell context's name. So button's name equals context's display name.

public class ButtonCellEditFactory : AbstractCellEditFactory
{
    public override Control HandleNewProperty(PropertyCellContext context)
    {
        var propertyDescriptor = context.Property;
        var target = context.Target;

        if (!IsListType(propertyDescriptor.PropertyType))
        {
            return null;
        }

        Button control = new Button
        {
            Name = context.DisplayName,
            Content = "[...]",
            Background = Brushes.LightGray,
            HorizontalAlignment = Avalonia.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OmerFarukAkyapak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant