Ibanez1408
Ibanez1408

Reputation: 5078

MudBlazor AppBar does not stick at position

I have this in my MainLayout.razor

@inherits LayoutComponentBase
@using System.Security.Claims
@inject HelpDesk.Client.Services.Interfaces.IAuthService AuthService

<MudLayout>
    <MudAppBar Elevation="3" Fixed="true">
        <MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
        <MudText Typo="Typo.h5" Class="ml-3">Autosweep Help Desk</MudText>
        <MudSpacer />
        <MudIconButton Icon="@Icons.Material.Filled.MoreVert" Color="Color.Inherit" Edge="Edge.End" />
        <AuthorizeView>
            <MudMenu FullWidth="true" ActivationEvent="@MouseEvent.MouseOver">
                <ActivatorContent>
                    <MudChip Icon="@Icons.Material.Filled.AccountCircle" Color="Color.Warning">@context.User.FindFirst(ClaimTypes.GivenName).Value</MudChip>
                </ActivatorContent>
                <ChildContent>
                    <MudMenuItem @onclick="@(() =>  AuthService.Logout())">
                        Logout
                    </MudMenuItem>
                </ChildContent>
            </MudMenu>
        </AuthorizeView>
    </MudAppBar>
    <MudDrawer ClipMode="DrawerClipMode.Docked" @bind-Open="_drawerOpen" Fixed="true" Color="Color.Success" Elevation="1">
        <MudDrawerHeader>
            <MudText Typo="Typo.h6">Prototyping</MudText>
        </MudDrawerHeader>
        <NavMenu />
    </MudDrawer>
    <MudMainContent>
        @Body
    </MudMainContent>
</MudLayout>

@code {
    bool _drawerOpen = true;

    void DrawerToggle()
    {
        _drawerOpen = !_drawerOpen;


    }
}

<MudThemeProvider />
<MudDialogProvider />
<MudSnackbarProvider /

but the "MudAppBar" does not stick at the top when I have a body that is long.

enter image description here

enter image description here

Upvotes: 0

Views: 4044

Answers (1)

philu
philu

Reputation: 874

If you have just updated MudBlazor version, clear cache and do a hard reload in your browser.

Upvotes: 0

Related Questions