private async void SetTimePopup_ItemClick(object sender, ItemClickEventArgs e) { TextBlock item = e.ClickedItem as TextBlock; var currentDelay = FadeAnimation.Duration.TimeSpan.TotalMilliseconds; switch (item.Text) { case "Slower transition": currentDelay *= 2; break; case "Faster transition": currentDelay /= 2; break; default: Debug.WriteLine("Unknown popup option " + item.Text + "selected"); return; } SetTransitionDelay(currentDelay); await AppServiceBridge.SendMessageAsync(new ValueSet { ["ConfigSlideShowDuration"] = currentDelay.ToString("N3") }); }
private async void ToggleBackground_Click(object sender, RoutedEventArgs e) { _whiteBackground = !_whiteBackground; SetBackground(_whiteBackground ? WHITE : BLACK); await AppServiceBridge.SendMessageAsync(new ValueSet { ["ConfigSlideShowBackgroundColor"] = _whiteBackground ? "white" : "black" }); }
private async void SetStretchTypePopup_ItemClick(object sender, ItemClickEventArgs e) { var stretch = ((TextBlock)e.ClickedItem).Text; SetStretch(stretch); await AppServiceBridge.SendMessageAsync(new ValueSet { ["ConfigSlideShowStrech"] = stretch }); }