Created
June 11, 2012 09:07
-
-
Save biac/2909194 to your computer and use it in GitHub Desktop.
Kujian - SplitPage.xaml.cs (START ボタン)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Button_Click_1(object sender, RoutedEventArgs e) | |
{ | |
itemListView.Background = backButton.Background; | |
Rotate(); | |
} | |
private bool _isContinue; | |
private bool _isBreaking; | |
private async void Rotate() { | |
_isContinue = true; | |
while (_isBreaking) | |
await Task.Delay(50); | |
while (_isContinue) | |
{ | |
SelectNext(); | |
await Task.Delay(50); | |
} | |
_isBreaking = true; | |
} | |
private void SelectNext() | |
{ | |
var lv = this.itemListView; | |
int nextIndex = lv.SelectedIndex + 1; | |
if (nextIndex >= lv.Items.Count) | |
nextIndex = 0; | |
lv.SelectedIndex = nextIndex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment