MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Dialog does not size to content
Nobody has claimed this yet.
- 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:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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