public DesignerCanvas(EDMDesignerViewContent container) { _container = container; AllowDrop = true; Loaded += new RoutedEventHandler(DesignerCanvas_Loaded); InitContextMenuCommandBindings(); }
public static DesignerCanvas GetDesignerCanvas(EDMDesignerViewContent container, EDMView edmView, DesignerView designerView) { DesignerCanvas designerCanvas = null; //if (designerView == null) //{ // EntityTypeDesigner.Init = true; // designerView = new DesignerView(); // designerView.ArrangeTypeDesigners = true; // designerView.Name = edmView.Name; // designerView.Zoom = 100; // if (edmView.CSDL.CSDL != null) // { // foreach (UIEntityType entityType in edmView.CSDL.EntityTypes) // { // designerView.AddTypeDesigner(new EntityTypeDesigner(entityType) { IsExpanded = true }); // } // } // EntityTypeDesigner.Init = false; //} if (designerView != null && _designerCanvas.ContainsKey(designerView)) { designerCanvas = _designerCanvas[designerView]; var parent = designerCanvas.Parent as DesignerCanvasPreview; if (parent != null) { parent.Content = null; } else { ((ContentControl)designerCanvas.Parent).Content = null; } } else { designerCanvas = new DesignerCanvas(container) { EDMView = edmView, DesignerView = designerView, Background = Brushes.White }; _designerCanvas.Add(designerView, designerCanvas); } return(designerCanvas); }
public DesignerCanvasPreview(EDMDesignerViewContent container) : this() { _container = container; }