public override void CreateBender(BenderConfig config) { if (CreateUI == false) { return; } _benderConfig = config; _curveEditorWindow = new CurveEditorWindow { Top = config.Top, Left = config.Left, Width = config.Width, Height = config.Height }; _curveTreeViewModel = new CurveTreeViewModel(_curveEditorWindow.curveEditorControl); _curveEditorWindow.DataContext = _curveEditorWindow.curveEditorControl.ControlsViewModel; _curveEditorWindow.curveTree.DataContext = _curveTreeViewModel; _curveEditorWindow.IsVisibleChanged += (sender, args) => _benderConfig.Visible = _curveEditorWindow.IsVisible; _curveEditorWindow.LocationChanged += (sender, args) => _benderLocationJustChanged = true; _curveEditorWindow.SizeChanged += (sender, args) => _benderLocationJustChanged = true; if (_benderConfig.Visible) { _curveEditorWindow.Show(); } _windows.Add(_curveEditorWindow); WindowHelper.EnsureOnScreen(_curveEditorWindow); }
//Bender public override void BenderShow() { if (_curveEditorWindow == null) { return; } _curveEditorWindow.Show(); }