I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
Introduction
App bar is a container, which is contain items on it, such as AppBarButtton, AppBarToggleButton, and AppBarSeparator. You can put an app bar at the top of the page, at the bottom of the page, or both. If you want to use app bar, right click on window screen or press window+Z because App bar is hidden by default.How to add App bar into your application
Step-1 : Assign a AppBar control to the TopAppBar or BottomAppBar property of a Page. like<Page.TopAppBar>
<AppBar>
<!-- Place control here like AppBarButton -->
</AppBar>
</Page.TopAppBar>
Step-2 : If you want to add App Bar at Bottom, must Assign a AppBar control to the BottomAppBar property of a Page, like
<Page.BottomAppBar>
<AppBar>
<!-- Place control here like AppBarButton -->
</AppBar>
</Page.BottomAppBar>
Let's take an simple example, App Bar with Refresh button
<Page.TopAppBar>
<AppBar>
<AppBarButton Label="refresh" Icon="Refresh" Click="AppBarButton_Click" />
</AppBar>
</Page.TopAppBar>
Comments
Post a Comment