Skip to content

Grid usage issues #17994

Answered by stevemonaco
nasterhe asked this question in Q&A
Jan 18, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The lower area will be empty. GridSplitter directly modifies the the RowDefinitions / ColumnDefinitions collection. Your third row containing the Border will have its auto-sizing set to an explicit height value and that's how the resizing is implemented.

You need to manually reset the definitions to auto otherwise. eg.

public MainWindow()
{
    InitializeComponent();

    showBottomArea.IsCheckedChanged += ShowBottomArea_IsCheckedChanged;
}

private void ShowBottomArea_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
    if (showBottomArea.IsChecked is false)
    {
        grid.RowDefinitions = RowDefinitions.Parse("*, auto, auto");
    }
}

I'm not sure if your…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nasterhe
Comment options

@stevemonaco
Comment options

Answer selected by nasterhe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants