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 }); }
Windows Presentation Foundation (WPF) is a new graphical subsystem for rendering user interfaces in windows based application developed in Visual Studio. WPF is a next generation presentation system for building windows client applications. WPF should be very familiar if you have previously built applications with .NET Framework using ASP.NET and Windows Forms.
XAML is a declarative XML based language that is used for initializing structured values and objects. When used in WPF, XAML is used to describe visual user interfaces. WPF allows for the definition of both 2D and 3D objects, rotations, animations, and a variety of other effects and features.
These simple steps can be followed to create a new WPF application:
XAML is a declarative XML based language that is used for initializing structured values and objects. When used in WPF, XAML is used to describe visual user interfaces. WPF allows for the definition of both 2D and 3D objects, rotations, animations, and a variety of other effects and features.
These simple steps can be followed to create a new WPF application:
- Start Visual Studio "the version you have".
- From the menu bar go to File>>New>>Project. A dialog box will appear.
- From the drop down list you can select the framework in which you want to work. In the left side pane expand Visual C#, and then select Windows.
- There is a middle pane including a list of templates. Select WPF Application template.
- You can specify a name and location for the project in the Name and Location textbox respectively.
- Click OK and MainWindow of the new project will appear.
A new project has been created with some files like other project. A file named MainWindow.xaml is already open as in our above screenshot, it will be shown first when launching the application. App.xaml is central starting point, can be used to change the first window.
You can run the application now to see the empty window because our XAML code consists nothing to show. To show a simple message “My First WPF Application”, we have to write the following code in between the Grid panel.
<Grid>
<TextBlock Text="My First WPF Application"></TextBlock>
</Grid>
Comments
Post a Comment