Beispiel #1
0
        public void SendToPane(PaneItemVm item, SidePanelVm target)
        {
            var source = managedPanes.Single(p => p.Items.Contains(item));

            source.SetActiveContentCommand.Execute(null);
            source.Items.Remove(item);
            target.Items.Add(item);
            target.SetActiveContentCommand.Execute(item);
        }
        private SidePanelVm BuildVm3(string name)
        {
            var sideVm = new SidePanelVm {
                Name = name
            };
            var item4 = new PaneItemVm()
            {
                ButtonText = "A", PaneContent = (FrameworkElement)Resources["Draw"]
            };

            return(sideVm);
        }
        private SidePanelVm BuildVm2(string name)
        {
            var sideVm = new SidePanelVm {
                Name = name
            };
            var item3 = new PaneItemVm()
            {
                ButtonText = "", PaneContent = (FrameworkElement)Resources["Cv"]
            };
            var item4 = new PaneItemVm()
            {
                ButtonText = "", PaneContent = (FrameworkElement)Resources["Draw"]
            };

            sideVm.Items.Add(item3);
            sideVm.Items.Add(item4);
            return(sideVm);
        }
        private SidePanelVm BuildVm(string name)
        {
            var sideVm = new SidePanelVm {
                Name = name
            };
            var item1 = new PaneItemVm()
            {
                ButtonText = "", PaneContent = (FrameworkElement)Resources["Rtb"]
            };
            var item2 = new PaneItemVm()
            {
                ButtonText = "", PaneContent = (FrameworkElement)Resources["Tv"]
            };

            sideVm.Items.Add(item1);
            sideVm.Items.Add(item2);
            return(sideVm);
        }
Beispiel #5
0
 public IEnumerable <ContextMenuEntryVm> GetItemsForPane(PaneItemVm selectedItem, SidePanelVm pane)
 {
     foreach (var managedPane in managedPanes.Except(new[] { pane }))
     {
         yield return(new ContextMenuEntryVm(selectedItem, managedPane, SendToPane));
     }
 }