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 }); }
On a Button control, Text is not enough to making it beautiful. So If you want to make attractive windows application then you should go for images. In this article i will show you how to add image on button control also how to align with text. Now lets to start.
Step-1 : Add a new windows form project in visual studio, i have visual studio 2013, you can work in earlier version.
Step-2 : Add a button control in designer view of form
Step-3 : Select 'Image' property of Button control. Button control-->Property-->Image
Step-4 : Click on "ok" Button
Step-5 : After adding the image on button control, Set "ImageAlign" property of Button control to MiddleLeft.
Step-6 : Also set "TextAlign" property of Button control to MiddleRight.
Step-7 : Set Text Property of button control, decide you. In this article button with image is related to fruits so i giving you fruits title.
Text = " Fruits"
Now, your button control looking like
Step-1 : Add a new windows form project in visual studio, i have visual studio 2013, you can work in earlier version.
Step-2 : Add a button control in designer view of form
Step-3 : Select 'Image' property of Button control. Button control-->Property-->Image
Step-4 : Click on "ok" Button
Step-5 : After adding the image on button control, Set "ImageAlign" property of Button control to MiddleLeft.
Step-6 : Also set "TextAlign" property of Button control to MiddleRight.
Step-7 : Set Text Property of button control, decide you. In this article button with image is related to fruits so i giving you fruits title.
Text = " Fruits"
Now, your button control looking like
Comments
Post a Comment