private void SetConfig(List <KeyValuePair <string, string> > pairs) { bool changed = false; foreach (KeyValuePair <string, string> kvp in pairs) { switch (kvp.Key.ToLower()) { case "transition": if (Transition.TryParse <Transition>(kvp.Value, true, out Transition transition)) { Transition = transition; SlidesAPI.State.Transition = transition; changed = true; } break; case "theme": if (Theme.TryParse <Theme>(kvp.Value, true, out Theme theme)) { Theme = theme; SlidesAPI.State.Theme = theme; changed = true; } break; default: break; } } if (changed) { SlidesAPI.UpdateStatus(); } }
//Scripts Events private async void OnWindowResize(object sender, EventArgs e) { await UpdateJsInteropVars(); SlidesAPI.UpdateStatus(); }