Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created September 6, 2013 17:41
Show Gist options
  • Save eternaltung/6467168 to your computer and use it in GitHub Desktop.
Save eternaltung/6467168 to your computer and use it in GitHub Desktop.
using System.Windows;
using Microsoft.Phone.Controls;
namespace HubtileStates
{
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();
}
private void HubTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
HubTile tile = sender as HubTile;
switch (tile.Message)
{
case "Expanded":
VisualStateManager.GoToState(tile, "Expanded", true);
break;
case "Semiexpanded":
VisualStateManager.GoToState(tile, "Semiexpanded", true);
break;
case "Flipped":
VisualStateManager.GoToState(tile, "Flipped", true);
break;
case "Collapsed":
VisualStateManager.GoToState(tile, "Collapsed", true);
break;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment