private void IconTextBtn_AutoGrid_Click(object sender, RoutedEventArgs e) { ImagePanel.AutoGridOperation(); ListBox_Frames.Items.Clear(); for (int i = 0; i < mUVAnim.Frames.Count; i++) { ListBox_Frames.Items.Add(KeyFrameWord + i); } Property_Frame.Instance = null; if (ListBox_Frames.Items.Count > 0) { ListBox_Frames.SelectedIndex = 0; } else { ListBox_Frames.SelectedIndex = 1; } }