private static string GetCurrentState(ImageEx image) => VisualStateManager.GetVisualStateGroups(image.FindDescendant <Grid>()).First(g => g.Name == "CommonStates").CurrentState.Name;