Files
radzen-blazor/Radzen.Blazor/RadzenProfileMenu.razor
2026-07-03 08:34:20 +03:00

36 lines
1.8 KiB
Plaintext

@inherits RadzenComponentWithChildren
@if (Visible)
{
<ul @ref="@Element" style="@Style" @attributes="Attributes" class="@GetCssClass()" id="@GetId()"
role="presentation" tabindex="-1">
<li class="rz-navigation-item" role="presentation">
<div @ref="@toggleElement" class="rz-navigation-item-wrapper" role="button" tabindex="0" aria-haspopup="menu"
aria-label="@ToggleAriaLabel"
aria-expanded="@((!Collapsed).ToString().ToLowerInvariant())" aria-controls="@($"{GetId()}-menu")"
@onkeydown="@OnKeyPress" @onkeydown:preventDefault=preventKeyPress @onkeydown:stopPropagation="stopKeydownPropagation">
<div class="rz-navigation-item-link">
<div class="item-text" @onkeydown:stopPropagation="stopGuardKeydownPropagation" @onkeydown="OnGuardKeyDown">
@if (Template != null)
{
@Template
}
</div>
@if (ShowIcon)
{
<i class=@ToggleClass>keyboard_arrow_down</i>
}
</div>
</div>
<ul @ref="@menuElement" id="@($"{GetId()}-menu")" class="rz-navigation-menu" role="menu" style="@contentStyle"
tabindex="-1" aria-label="@ToggleAriaLabel" aria-hidden="@(Collapsed ? "true" : "false")"
aria-activedescendant="@ActiveDescendantId"
@onkeydown="@OnKeyPress" @onkeydown:preventDefault=preventKeyPress @onkeydown:stopPropagation="stopKeydownPropagation">
<CascadingValue Value=this>
@ChildContent
</CascadingValue>
</ul>
</li>
</ul>
}