public TemplateManagementWindow(TemplateManagementViewModel viewModel)
        {
            this.viewModel = viewModel;
            DataContext    = this.viewModel;

            InitializeComponent();
            //this.Resources.MergedDictionaries.Add(EtkWpfApplication.EtkWpfMainResources);
            //viewModel.PropertyChanged += OnPropertyChanged;
        }
Ejemplo n.º 2
0
        /// <summary> Template creation</summary>
        /// <param name="caller">Range where to create the menu</param>
        public static void AddTemplate(ExcelInterop.Range caller)
        {
            using (ExcelMainWindow excelWindow = new ExcelMainWindow(caller.Application.Hwnd))
            {
                ExcelInterop.Range firstOutputRange = caller.Offset[0, 1];

                TemplateManagementViewModel viewModel = new TemplateManagementViewModel(null);
                TemplateManagementWindow    window    = new TemplateManagementWindow(viewModel);

                WindowInteropHelper windowInteropHelper = new WindowInteropHelper(window);
                windowInteropHelper.Owner = excelWindow.Handle;
                if (window.ShowDialog().GetValueOrDefault())
                {
                }
            }
        }