public PreviewCanvasView(string file_path, Canvas _ca) { InitializeComponent(); _file_path = file_path; ucaVM = new UICanvasViewModel(); __canvas = _ca; this.Loaded += new RoutedEventHandler(ViewLoded); }
private void ViewLoded(object sender, RoutedEventArgs e) { if (Application.Current.MainWindow != null) { Window window = Application.Current.MainWindow; ctrVM = window.DataContext as ControlViewModel; ucaVM = ctrVM._ucaVM; ctrVM._ucaVM.uicanV = this; _tabControls = ctrVM.tabControlsV; ctrVM.currentCanvas = MyCanvas; _cutItem = new UIElement(); _cutInfo = new UIElementInfo(); } }
private void ViewLoded(object sender, RoutedEventArgs e) { if (Application.Current.MainWindow != null) { Window window = Application.Current.MainWindow; ctrVM = window.DataContext as ControlViewModel; ucaVM = ctrVM._ucaVM; _tabControls = ctrVM.tabControlsV; _webBrowser.LoadCompleted += webBrowser_LoadCompleted; } //doc = (mshtml.HTMLDocument)_webBrowser.Document; }