Pre-Conf Workshop: Full-stack C# Web Applications with Blazor with Roland Guijt
Kista May 27, 2020, 9:00 AM - 5:00 PM
Microsoft MVP, Pluralsight author, ASP.NET insider
You'll experience the advantages of this model in this session and you will know how to create an application using it. We'll take a look at both hosting models of Blazor using server-side rendering and client-side rendering. And we'll spend a lot of time at the core of Blazor: Creating components.
- Explain what Blazor is.
- Explain the hosting models of Blazor.
- Start with a basic component. Explore the code that is generated for it.
- Show that the class derives from ComponentBase
- Write a class that derives from ComponentBase and let the component derive from that.
- Show partial classes as code-behind files
- Show that the Parameter attribute opens up properties in a component to the outside world.
- Briefly show one-way databinding to component properties
- Explain the different lifecycle methods that can be overridden.
- Two-way databinding HTML elements with @bind
- Using a more advanced component, show that in many cases just using @bind is not enough
- Show that two-way databinding can also work by manually handling events
- Introduce custom component events with EventCallback
- Use chained binds to two-way databind to properties of a custom component
- Propagating data to all components using Cascading values
- Show Attribute splatting, especially powerful when used in combination with cascading values
- Referencing components with @ref
- Show a basic templated component
- Apply generics to a templated component
- Restrict the generic parameter of a templated component to use the type in the template itself