void item_ItemSelectedEvent(object sender, CatrobatListViewEventArgs e) { var tmpObj = (sender as CatrobatListViewItem).Content; bool contains = SmartSelectedItems.Contains(tmpObj); AddRemoveSelectedItem(tmpObj, contains); if (tmpObj is BlockBeginBrick) { AddRemoveSelectedItem((tmpObj as BlockBeginBrick).End, contains); if (tmpObj is IfBrick) { AddRemoveSelectedItem((tmpObj as IfBrick).Else, contains); } else if (tmpObj is ElseBrick) { AddRemoveSelectedItem((tmpObj as ElseBrick).Begin, contains); } } else if (tmpObj is BlockEndBrick) { AddRemoveSelectedItem((tmpObj as BlockEndBrick).Begin, contains); if (tmpObj is EndIfBrick) { AddRemoveSelectedItem((tmpObj as EndIfBrick).Else, contains); } } }
void item_ItemGroupEvent(object sender, CatrobatListViewEventArgs e) { _scrollViewer.Focus(FocusState.Pointer); GroupItem(sender as CatrobatListViewItem); }
void clvw_ItemDragCompletedEvent(object sender, CatrobatListViewEventArgs e) { this.ItemsSource.CollectionChanged -= ItemsSource_CollectionChanged; DragTransfer(e.GetTmpControl(), e.GetOrignalContent(), e.GetGroupedItems()); this.ItemsSource.CollectionChanged += ItemsSource_CollectionChanged; }