本文整理汇总了C#中AvalonDock.DocumentPane.RemoveContent方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentPane.RemoveContent方法的具体用法?C# DocumentPane.RemoveContent怎么用?C# DocumentPane.RemoveContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AvalonDock.DocumentPane
的用法示例。
在下文中一共展示了DocumentPane.RemoveContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInitialized
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);
}
示例2: OnInitialized
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);
}
示例3: DropInto
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();
}