private async Task NotifyChanged(string classname) { if (classname != null && ClassnameChanged.HasDelegate && _previousClassname != classname) { _previousClassname = classname; await ClassnameChanged.InvokeAsync(classname); } }
protected override async Task OnAfterRenderAsync(bool firstRender) { if (_classname != null && !_rendered) { _rendered = true; Classname = _classname; await ClassnameChanged.InvokeAsync(Classname); } }
protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { _currentTheme = SlidesAPI.State.Theme; } if (_currentTheme != SlidesAPI.State.Theme) { IStyled themeStyled = Styled.WithId("BlazorSlidesTheme", 200_000); await themeStyled.ClearStylesAsync(); _currentTheme = SlidesAPI.State.Theme; _rendered = false; } if (_classname != null && _previousClassname != _classname && !_rendered) { _previousClassname = _classname; _rendered = true; Classname = _classname; await ClassnameChanged.InvokeAsync(Classname); } }