public HubPage() { InitializeComponent(); Init(); Boxtana.Hide(); Loaded += async(sender, args) => { await Task.Delay(800); if (!triggered) { await Boxtana.Do(BoxtanaAction.Entrance); } if (!triggered) { await Task.Delay(500); } if (triggered) { return; } while (!triggered) { await Boxtana.Do(BoxtanaAction.RandomWait); } }; }
public HubPage() { InitializeComponent(); // Hub is only supported in Portrait orientation DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait; NavigationCacheMode = NavigationCacheMode.Disabled; Init(); Boxtana.Hide(); Loaded += async(sender, args) => { await Task.Delay(1800); if (!triggered) { await Boxtana.Do(BoxtanaAction.Entrance); } if (!triggered) { await Task.Delay(500); } if (triggered) { return; } while (!triggered) { await Boxtana.Do(BoxtanaAction.RandomWait); } }; }
private async void One_OnClick(object sender, RoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.Exit); await Task.Delay(500); await Boxtana.Do(BoxtanaAction.Entrance); }
private async void Boxtana_OnTapped(object sender, TappedRoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.Exit); await Task.Delay(500); await Boxtana.Do(BoxtanaAction.Entrance); }
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { var item = (ComboBoxItem)combo.SelectedItem; if (item == null) { return; } var value = (string)item.Content; if (BoxtanaAction.TryParse(value, out action)) { Boxtana.Do(action); } }
private async void GamesGridView_ItemClick(object sender, ItemClickEventArgs e) { var gameDefinition = ((GameDefinition)e.ClickedItem); triggered = true; await Task.WhenAll(new [] { AnimationTrigger.AnimateClose(), Boxtana.Do(BoxtanaAction.Exit), GamesGridView.AnimateItems( new BounceOutDownAnimation(), 0.05, gameDefinition, new ExpandAnimation { Duration = 0.8, FinalScale = 1.1 }) }); Frame.Navigate(typeof(GamePage), gameDefinition.UniqueId); }
private async void Three_OnClick(object sender, RoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.Color); }
private async void Two_OnClick(object sender, RoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.RotateRight); }
private async void Boxtana_OnTapped(object sender, TappedRoutedEventArgs e) { Boxtana.Do(action); }
private async void Boxtana_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.Exit); Frame.Navigate(typeof(AboutPage)); }
private async void One_OnClick(object sender, RoutedEventArgs e) { await Boxtana.Do(BoxtanaAction.Swing); }