Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expander's content doesn't resize with grid column. #787

Closed
ms-somanna opened this issue Apr 14, 2021 · 0 comments
Closed

Expander's content doesn't resize with grid column. #787

ms-somanna opened this issue Apr 14, 2021 · 0 comments

Comments

@ms-somanna
Copy link

ms-somanna commented Apr 14, 2021

I'm trying to build a application that has two expanders one on the left-side and other on the right-side and grid in between them both. The expanders must be able to resize themselves correspondingly automatically resizing the grid in between them. I've used the code below to try and achieve the results but what's happening is the the expander's content doesn't resize when I drag the grid splitter but the column containing the expander is resized. But if I use the same code in a non-HandyControls application it works as expected.

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="5" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="5" />
        <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>

    <Expander x:Name="ProjectsExpander" Header="Projects" IsExpanded="True" ExpandDirection="Right">
        <TextBlock>...</TextBlock>
    </Expander>

    <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />

    <Grid Grid.Column="2" Background="Yellow">
        <TextBlock>...</TextBlock>
    </Grid>

    <GridSplitter Grid.Column="3" HorizontalAlignment="Stretch" />

    <Expander Grid.Column="4" Header="Properties" ExpandDirection="Left" HorizontalAlignment="Right" Width="235">
        <TextBlock>...</TextBlock>
    </Expander>
</Grid>

Also note, the grid inside the expander's content appears as a thin vertical green line as shown in image below which is unexpected.
Screenshot_20210414-145047.png

@ms-somanna ms-somanna changed the title Expander's content doesn't resize with grid column. I'm trying to build a application that has two expanders one on the left-side and other on the right-side and grid in between them both. The expanders must be able to resize themselves correspondingly automatically resizing the grid in between them. I've used the code below to achieve the results but what's happening is the the expander's content doesn't resize when I drag the grid splitter on the column containing the expander is resized. But if I use the same code in a non-HandyControls application it works as expected. Expander's content doesn't resize with grid column. Apr 14, 2021
@NaBian NaBian closed this as completed in 63acdfc Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant