Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How do you position a MudBlazor Dialog using a custom DialogPosition?

$
0
0

Given a MudBlazor MudDialog component with a Position set to DialogPosition.Custom, the dialog will appear absolutely positioned to the top left hand corner of the viewport.

@{   var dialogOptions = new DialogOptions   {     Position = DialogPosition.Custom,   };}<MudDialog Options="@dialogOptions" Class="custom-dialog"><DialogContent>    Hello World.</DialogContent></MudDialog>

There isn't a position property in the options. The documentation doesn't reference custom positioning at all.

Once the component has rendered, the CSS class .custom-dialog isn't applied to the dialog parent, but a static div a few levels down the tree, so positional styles cannot be applied to it.

Is there a way to set the custom position?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>