MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Dialog does not size to content

Open
#1,378 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

This is an issue I have not been able to repeatably reproduce and I mostly see it in production. I'm not sure how to troubleshoot it so any pointers would be appreciated.

I use a single dialog host in the "shell" view:

<UserControl>
    <Grid>
      <mdt:DialogHost Name="ShellDialogHost" Identifier="ShellDialog" UseLayoutRounding="True" >
    </Grid>
</UserControl>

Dialogs are opened by calling DialogHost.Show.

Most of the time the dialogs are opened with the correct size but sometimes they open like this:

file-259

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shell view's DialogHost configuration and the calls to DialogHost.Show, then investigate the intermittent sizing behavior using the provided reproduction details and screenshot. Done means identifying a repeatable cause and ensuring dialogs consistently size to their content.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.