MaterialDesignInXamlToolkit: Dialog does not size to content

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

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 22 (21 by maintainers)

Most upvoted comments

The window is always full screen. I’m using a view model and a data template. Most of the time it works. Some times it doesn’t and then mostly in production.