private void BtnClearSlides_Click(object sender, RoutedEventArgs e) { if (isStarted && isLoggedIn) { //clear slides for (int i = listSlides.Items.Count - 1; i >= 0; i--) { sdk.XRemoveSlide(i); } } }