public ProjectWindow()
        {
            InitializeComponent();

            this.toolbarManager = new ToolbarManager();
            this.toolbarManager.SelectedToolbar = this.toolbarManager.Items[1].Children[4];

            this.pageManager = new PageManager();
            Project       project = CreateProject();
            PageViewModel page    = new PageViewModel(project);

            pageManager.Add(page);
            this.DataContext = pageManager;//.Items[0];
        }
Exemple #2
0
        /// <summary>
        /// Initialize page layout.
        /// </summary>
        private void Initialize()
        {
            try
            {
                //ConvertWindowToDataTemplate();
                //this.Title += " ver " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

                this.toolbarManager      = new ToolbarManager();
                this.Toolbox.DataContext = toolbarManager;
                this.Toolbox.ItemsSource = toolbarManager.Items;

                //testing only
                this.pageManager = new PageManager();
                Project       project = CreateProject();
                PageViewModel page    = new PageViewModel(project);
                pageManager.Add(page);
                this.MainGrid.DataContext = pageManager;
            }
            catch (Exception ex)
            {
                Logger.Info(typeof(MainWindow), ex);
                throw ex;
            }
        }