Resolve "Evaluate .NET MAUI" #70

Merged
thorsten merged 42 commits from 34-evaluate-net-maui into main 2022-09-17 07:21:22 +00:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit 308aece8c8 - Show all commits

No files matched your search

@@ -1,4 +1,6 @@
<li class="nav-item">
@if (DeviceInfo.Idiom == DeviceIdiom.Desktop || DeviceInfo.Idiom == DeviceIdiom.Tablet)
{
<a class="nav-link active" aria-current="page" href="@this.Route">
@if (this.ShowIcon)
{
@@ -6,4 +8,15 @@
}
<span class="ms-1 align-middle">@this.Text</span>
</a>
}
else
{
<a class="nav-link active" aria-current="page" href="@this.Route" @onclick="@this.Navigate" data-bs-toggle="collapse" data-bs-target="#navbarContent">
@if (this.ShowIcon)
{
<Icon Filename="@this.IconFilename" Size="25" AltText="@this.AltText" />
}
<span class="ms-1 align-middle">@this.Text</span>
</a>
}
</li>
@@ -16,5 +16,10 @@ public partial class NavItem : ComponentBase
[Parameter]
public string IconFilename { get; set; } = string.Empty;
[Inject]
public NavigationManager NavigationManager { get; set; }
private string AltText => $"Navigation: {this.Text}";
private void Navigate() => this.NavigationManager.NavigateTo(this.Route);
}