Esempio n. 1
0
 private async Task NotifyChanged(string classname)
 {
     if (classname != null && ClassnameChanged.HasDelegate && _previousClassname != classname)
     {
         _previousClassname = classname;
         await ClassnameChanged.InvokeAsync(classname);
     }
 }
Esempio n. 2
0
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (_classname != null && !_rendered)
     {
         _rendered = true;
         Classname = _classname;
         await ClassnameChanged.InvokeAsync(Classname);
     }
 }
Esempio n. 3
0
        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);
            }
        }