<RadzenStack class="rz-p-sm-12">
    <RadzenSwitch @bind-Value=@value Change=@(args => OnChange(args, "Switch")) InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "Switch value" }})" />
    <EventConsole @ref=@console Style="width: 100%;" />
</RadzenStack>

@code {
    bool value;

    EventConsole console;

    void OnChange(bool? value, string name)
    {
        console.Log($"{name} value changed to {value}");
    }
}