protected override void OnInitialized(EventArgs e) { //setup window size _floatingWindow.Width = _documentToTransfer.ContainerPane.ActualWidth; _floatingWindow.Height = _documentToTransfer.ContainerPane.ActualHeight; //save current content position in container pane _previousPane = _documentToTransfer.ContainerPane as DocumentPane; _arrayIndexPreviousPane = _previousPane.Items.IndexOf(_documentToTransfer); SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); //Style = _previousPane.Style; AttachStyleFromPane(_previousPane); //remove content from container pane _previousPane.RemoveContent(_arrayIndexPreviousPane); //add content to my temporary pane Items.Add(_documentToTransfer); _documentToTransfer.SetIsFloating(true); base.OnInitialized(e); }
protected override void OnInitialized(EventArgs e) { _previousPane = _documentToTransfer.ContainerPane as DocumentPane; if (_documentToTransfer != null && _documentToTransfer.FloatingWindowSize.IsEmpty) { if (_previousPane != null) { _documentToTransfer.FloatingWindowSize = new Size(_previousPane.ActualWidth, _previousPane.ActualHeight); } else { _documentToTransfer.FloatingWindowSize = new Size(400.0, 400.0); } } if (_documentToTransfer != null && !_documentToTransfer.FloatingWindowSize.IsEmpty) { _floatingWindow.Width = _documentToTransfer.FloatingWindowSize.Width; _floatingWindow.Height = _documentToTransfer.FloatingWindowSize.Height; } if (_previousPane != null) { //setup window size _floatingWindow.Width = _documentToTransfer.ContainerPane.ActualWidth; _floatingWindow.Height = _documentToTransfer.ContainerPane.ActualHeight; //save current content position in container pane _arrayIndexPreviousPane = _previousPane.Items.IndexOf(_documentToTransfer); SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); //Style = _previousPane.Style; AttachStyleFromPane(_previousPane); //remove content from container pane _previousPane.RemoveContent(_arrayIndexPreviousPane); } //add content to my temporary pane Items.Add(_documentToTransfer); _documentToTransfer.SetIsFloating(true); LayoutTransform = (MatrixTransform)_documentToTransfer.TansformToAncestor(); base.OnInitialized(e); }
protected override void OnInitialized(EventArgs e) { _previousPane = _documentToTransfer.ContainerPane as DocumentPane; if (_documentToTransfer != null && _documentToTransfer.FloatingWindowSize.IsEmpty) { if (_previousPane != null) _documentToTransfer.FloatingWindowSize = new Size(_previousPane.ActualWidth, _previousPane.ActualHeight); else _documentToTransfer.FloatingWindowSize = new Size(400.0, 400.0); } if (_documentToTransfer != null && !_documentToTransfer.FloatingWindowSize.IsEmpty) { _floatingWindow.Width = _documentToTransfer.FloatingWindowSize.Width; _floatingWindow.Height = _documentToTransfer.FloatingWindowSize.Height; } if (_previousPane != null) { //setup window size _floatingWindow.Width = _documentToTransfer.ContainerPane.ActualWidth; _floatingWindow.Height = _documentToTransfer.ContainerPane.ActualHeight; //save current content position in container pane _arrayIndexPreviousPane = _previousPane.Items.IndexOf(_documentToTransfer); SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); //Style = _previousPane.Style; AttachStyleFromPane(_previousPane); //remove content from container pane _previousPane.RemoveContent(_arrayIndexPreviousPane); } //add content to my temporary pane Items.Add(_documentToTransfer); _documentToTransfer.SetIsFloating(true); LayoutTransform = (MatrixTransform)_documentToTransfer.TansformToAncestor(); base.OnInitialized(e); }
internal void DropInto(DocumentPane paneDragged, DocumentPane paneToDropInto) { //transfer tha contents of dragged pane (conatined in a FloatingWindow) //to the pane which user select //ManagedContent contentToFocus = null; while (paneDragged.Items.Count > 0) { var contentToTransfer = paneDragged.RemoveContent(0); paneToDropInto.Items.Insert(0, contentToTransfer); //contentToFocus = contentToTransfer; contentToTransfer.Activate(); } //paneToDropInto.SelectedIndex = 0; //paneToDropInto.Focus(); //if (contentToFocus != null) // contentToFocus.Activate(); }