Using MatBlazor (1.5.4) MatDialog
, I'm interested in having the dialog size fixed or set to a percentage of the total page. Currently, the behaviour is that the dialog opens with its size fitting the content.
I tried adding explicit styling in different part of the dialog definition, without success.
<MatDialog @bind-IsOpen="@IsDialogOpen" Style="width: 600px; height:600px">
<MatDialogTitle>Some title</MatDialogTitle>
<MatDialogContent Style="width: 600px; height:600px">This is the content</MatDialogContent>
<MatDialogActions>
<MatButton OnClick="@(() => this.IsDialogOpen = false)" Icon="close">Close</MatButton>
</MatDialogActions>
</MatDialog>
@code
{
private bool IsDialogOpen { get; set; }
}
It seems there is no explicit mechanism integrated into the MatDialog
component thus I guess explcit styling/CSS is needed.
What would be a correct approach to control the dialog sizing?