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 }); }
If you want to design login control then must to set the special character in password box. Today, we will learn, how to design password box in WPF. In WPF, we have a PasswordBox tag in XAML , through this we can add Password box in WPF. I have a simple login control through you can see password control.
The complete code of login control
<Window x:Class="WpfApplication8.password"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="password" Height="300" Width="300">
<Grid>
<StackPanel Margin="20">
<Label>Password Box Example</Label>
<WrapPanel>
<Label>Username:</Label>
<TextBox Width="100"/>
</WrapPanel>
<WrapPanel>
<Label>Password:</Label>
<PasswordBox PasswordChar="x" MaxLength="8" Width="100"/>
</WrapPanel>
</StackPanel>
</Grid>
</Window>
Code Generates the following output:
Comments
Post a Comment