public static TextPanelViewModel Create(string caption, Point location, RibbonMergingViewModel parentViewModel)
        {
            TextPanelViewModel instance = ViewModelSource.Create(() => new TextPanelViewModel());

            instance.ParentViewModel = parentViewModel;
            instance.Caption         = caption;
            instance.Location        = location;
            return(instance);
        }
예제 #2
0
 public RibbonMergingViewModel()
 {
     Panels = new ObservableCollection <PanelViewModel>();
     Panels.Add(TextPanelViewModel.Create("Simple Pad", new Point(0.0, 0.0), this));
     Panels.Add(PaintPanelViewModel.Create("Simple Paint", new Point(300.0, 50.0), this));
 }
예제 #3
0
 public void CreateNewTextPanel()
 {
     Panels.Add(TextPanelViewModel.Create("Simple Pad", new Point(50, 50), this));
     Panels[Panels.Count - 1].IsActive = true;
 }