public SnippWindow(ICloseListener listener) { InitializeComponent(); vm = new DraggableViewModel(this); //if(DesignerProperties.GetIsInDesignMode(this)) if ((bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue)) { vm.Tags.Add(new Tag() { tName = "TagTest" }); } this.DataContext = vm; this.ShowActivated = true; this.WindowState = WindowState.Normal; _closeListener = listener; }
public void AddCloseListener(ICloseListener listener) { closeListeners.Add(listener); }