public ToolboxSpecialItemsUserControl()
 {
     InitializeComponent();
     DataContext = new ToolboxSpecialItemsViewModel();
     Style itemContainerStyle = new Style(typeof(ListBoxItem));
     //itemContainerStyle.Setters.Add(new Setter(ListBoxItem.AllowDropProperty, true));
     itemContainerStyle.Setters.Add(new EventSetter(ListBoxItem.PreviewMouseMoveEvent, new MouseEventHandler(List_MouseMove)));
     itemContainerStyle.Setters.Add(new EventSetter(ListBoxItem.PreviewGiveFeedbackEvent, new GiveFeedbackEventHandler(List_GiveFeedback)));
     //itemContainerStyle.Setters.Add(new EventSetter(ListBoxItem.DropEvent, new DragEventHandler(listbox1_Drop)));
     lstSpecialItems.ItemContainerStyle = itemContainerStyle;
 }
Exemple #2
0
 public void Initialize()
 {
     string importPath = System.IO.Path.Combine(Environment.CurrentDirectory, @"Ressources\Configuration.xlsx");
     ifvm = ToolboxStandardItemsViewModel.Instance;
     glvm = ToolboxGroupsViewModel.Instance;
     WorkspaceViewModel.Instance = null;
     wvm = WorkspaceViewModel.Instance;
     wvm.LoadWorkspace(importPath);
     ifvm.PopulateToolbox();
     glvm.PopulateGTList();
     sfvm = new ToolboxSpecialItemsViewModel();
     gtvm = new GroupTableViewModel();
 }