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 }); }
Wrap panel is similar to stack panel, but while stack panel stacks its items, wrap panel wrap them to additional rows and columns according to provided space. It may be used when the list of items is to be shown. When we are not sure about the item count then wrap panel will wrap the items continuously like in windows explorer.
Orientation property of wrap panel is Horizontal by default that is changeable. The above image is simple created by using the following code:
Nested wrap panel can be used in the same way stack panel is used.
Dock panel
Orientation property of wrap panel is Horizontal by default that is changeable. The above image is simple created by using the following code:
<WrapPanel>
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<WrapPanel Orientation="Vertical">
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<WrapPanel Orientation="Vertical">
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
Nested wrap panel can be used in the same way stack panel is used.
Dock panel
Comments
Post a Comment