Тёмный

Blazor Component Events using EventCallback 

Progress Telerik
Подписаться 16 тыс.
Просмотров 14 тыс.
50% 1

Learn about component events by creating a select event for a component. In this short video, we'll learn how Blazor renders components and how to handle events. We will add a custom event to an existing component using the EventCallback method.
Important links:
- Blazor Documentation dotnet.microsoft.com/apps/asp...
- Demo Source github.com/telerik/Blazor-Qui...
- Telerik UI for Blazor www.telerik.com/blazor-ui
- Webinar: Adopting Blazor prgress.co/adopting-blazor-we...
Index:
[0:32] Component Rendering & Render Tree Explained
[1:37] Demo Begins
[2:09] Using EventCallback
[2:24] Raising Events with InvokeAsync
[4:05] Consequences of an Action Delegate
Credits:
Ed Charbeneau is a Sr. Developer Advocate at Progress who specializes in the Telerik UI brand of UI components.

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@ximonx
@ximonx 5 лет назад
Nice example! Was a huge help!
@svyatoslavstrygin5653
@svyatoslavstrygin5653 4 года назад
worx, thank you!
@Sammy0021
@Sammy0021 4 года назад
Nice tutorial... by the way which fonts are u using for the visual studio code editor...its very nice
@enetstudio4176
@enetstudio4176 5 лет назад
You should ensure that the EventCallback object has a delegate before you invoke the delegate, like this: if (OnSelected.HasDelegate) { OnSelected.InvokeAsync(this.DayOfWeek); }
@gogoku7
@gogoku7 4 года назад
I have never really worked with Event and Delegate, what's the purpose of if(OnSelected.HasDelegate) ?
@AngusMcIntyre
@AngusMcIntyre 4 года назад
The modern pattern can perform all this in one line: OnSelected?.Invoke(sender, args);
@yuriygo
@yuriygo Год назад
Demo projects are not compiled due to multiple errors...There is no method such as OnInit(). It should be OnInitializedAsync()
@TonyHenrique
@TonyHenrique 3 года назад
Very nice! Just tried it here with a custom class for my event, and it only worked if it inherit from EventArgs Like: public class MyCustomEventData : EventArgs ...then using it like: [Parameter] public EventCallback OnArquivoEnviado { get; set; } /////// var mce = new MyCustomEventData() { ... } await OnArquivoEnviado.InvokeAsync(mce); //////// To Bind it: public void Enviado(MyCustomEventData d) { } // Hope this helps somebody.
Далее
Installing Telerik UI for Blazor
4:06
Просмотров 10 тыс.
Blazor Component Basics
6:33
Просмотров 13 тыс.
Blazor Basics: Event Handlers
25:34
Просмотров 3,7 тыс.
Blazor @Ref and EventCallBacks
8:42
Просмотров 2,9 тыс.
Blazor Two-Way Binding
3:59
Просмотров 10 тыс.
Blazor EventCallback
7:48
Просмотров 34 тыс.
ASP.NET Core Series: PWA's with Blazor
29:08
Просмотров 27 тыс.
Waterfall Over Agile In 2023???
9:00
Просмотров 57 тыс.
Colorful Vulcan w rtx 4070ti Super
13:30
Просмотров 57 тыс.
Здесь упор в процессор
18:02
Просмотров 339 тыс.