Changeset 11935 for extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs
- Timestamp:
- Aug 12, 2011, 4:32:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs
r11926 r11935 14 14 using Com.Piwigo.Wpf.Helper; 15 15 using Com.Piwigo.Wpf.Command; 16 using Com.Piwigo.Wpf.DTO; 16 17 17 18 namespace Com.Piwigo.Wpf … … 42 43 } 43 44 45 private void listViewCategory_PreviewMouseDown(object sender, MouseButtonEventArgs e) 46 { 47 e.Handled = false; 48 DependencyObject dep = (DependencyObject)e.OriginalSource; 49 while ((dep != null) && !(dep is TreeViewItem)) 50 { 51 dep = VisualTreeHelper.GetParent(dep); 52 } 53 if (dep != null) 54 { 55 if (((TreeViewItem)dep).DataContext is PwgCategoryWPF) 56 { 57 PwgCategoryWPF aCat = (PwgCategoryWPF)((TreeViewItem)dep).DataContext; 58 59 if ((e.ChangedButton == MouseButton.Left) && (e.ClickCount == 1)) 60 { 61 // left single click event 62 if (aCat.Childrens == null) 63 { 64 AppHelper.ExecuteCommand<PwgCmdGetSubCategorieforCategory>(aCat); 65 } 66 } 67 } 68 } 69 } 70 44 71 45 72 }
Note: See TracChangeset
for help on using the changeset viewer.