本文整理汇总了C#中AvalonDock.DocumentPane类的典型用法代码示例。如果您正苦于以下问题:C# DocumentPane类的具体用法?C# DocumentPane怎么用?C# DocumentPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentPane类属于AvalonDock命名空间,在下文中一共展示了DocumentPane类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:apoorv-vijay-joshi,项目名称:FSE-2011-PDE,代码行数:25,代码来源:FloatingDocumentPane.cs
示例2: switch
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.DocumentManager = ((AvalonDock.DocumentPane)(target));
return;
}
this._contentLoaded = true;
}
开发者ID:jacobmodayil,项目名称:GuestBookerStudio,代码行数:9,代码来源:InnerWindow.g.i.cs
示例3: AdapterAssociatesDocumentPaneWithRegion
public void AdapterAssociatesDocumentPaneWithRegion()
{
var documentPane = new DocumentPane();
IRegionAdapter adapter = new DocumentPaneRegionAdapter(null);
IRegion region = adapter.Initialize(documentPane, "Region1");
Assert.IsNotNull(region);
}
开发者ID:jfromaniello,项目名称:prismcontrib,代码行数:9,代码来源:DocumentPaneRegionAdapterFixture.cs
示例4: AttachStyleFromPane
void AttachStyleFromPane(DocumentPane copyFromPane)
{
if (copyFromPane == null)
return;
//Binding bnd = new Binding("Style");
//bnd.Source = copyFromPane;
//bnd.Mode = BindingMode.OneWay;
//SetBinding(StyleProperty, bnd);
}
开发者ID:apoorv-vijay-joshi,项目名称:FSE-2011-PDE,代码行数:11,代码来源:FloatingDocumentPane.cs
示例5: 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);
}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:47,代码来源:FloatingDocumentPane.cs
示例6: ClonePane
public override Pane ClonePane()
{
DocumentPane paneToAnchor = new DocumentPane();
ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height));
//transfer contents from hosted pane in the floating window and
//the new created dockable pane
while (HostedPane.Items.Count > 0)
{
paneToAnchor.Items.Add(
HostedPane.RemoveContent(0));
}
paneToAnchor.ApplyTemplate();
return paneToAnchor;
}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:17,代码来源:DocumentFloatingWindow.cs
示例7: RestoreLayout
/// <summary>
/// Restore from xml a resizing panel or a documentpane
/// </summary>
/// <param name="mainElement"></param>
/// <param name="actualContents"></param>
/// <returns></returns>
object RestoreLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane)
{
if (mainElement == null)
throw new ArgumentNullException("mainElement");
if (mainElement.Name == "ResizingPanel" ||
mainElement.Name == "DocumentPaneResizingPanel")
{
return RestoreResizingPanel(mainElement, actualContents, actualDocuments, ref mainDocumentPane);
}
else if (mainElement.Name == "DocumentPane")
{
mainDocumentPane = RestoreDocumentPaneLayout(mainElement, actualContents, actualDocuments);
return mainDocumentPane;
}
throw new InvalidOperationException(string.Format("Unable to deserialize '{0}' element", mainElement.Name));
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:24,代码来源:DockingManager.cs
示例8: RestoreDocumentPaneLayout
///// <summary>
///// Restore from xml a document pane
///// </summary>
///// <param name="childElement"></param>
///// <param name="mainExistingDocumentPane"></param>
///// <param name="existingDocumentPanel"></param>
///// <param name="dockableContents"></param>
//void RestoreDocumentPaneLayout(XmlElement childElement, out DocumentPane mainExistingDocumentPane, out DocumentPaneResizingPanel existingDocumentPanel, DockableContent[] dockableContents)
//{
// mainExistingDocumentPane = (Content is DocumentPane) ? Content as DocumentPane : GetMainDocumentPane(Content as ResizingPanel);
// if (mainExistingDocumentPane != null)
// {
// existingDocumentPanel = mainExistingDocumentPane.GetParentDocumentPaneResizingPanel();
// }
// else
// {
// existingDocumentPanel = null;
// }
// if (existingDocumentPanel != null)
// {
// if (existingDocumentPanel.Parent is ResizingPanel)
// {
// ((ResizingPanel)existingDocumentPanel.Parent).RemoveChild(existingDocumentPanel);
// }
// else if (existingDocumentPanel.Parent is DockingManager)
// {
// ((DockingManager)existingDocumentPanel.Parent).Content = null;
// }
// }
// else if (mainExistingDocumentPane != null)
// {
// if (mainExistingDocumentPane.Parent is ResizingPanel)
// {
// ((ResizingPanel)mainExistingDocumentPane.Parent).RemoveChild(mainExistingDocumentPane);
// }
// else if (mainExistingDocumentPane.Parent is DockingManager)
// {
// ((DockingManager)mainExistingDocumentPane.Parent).Content = null;
// }
// }
// foreach (XmlElement contentElement in childElement.ChildNodes)
// {
// if (contentElement.HasAttribute("Name"))
// {
// DockableContent foundContent = null;
// string contentName = contentElement.GetAttribute("Name");
// foreach (DockableContent content in dockableContents)
// {
// if (content.Name == contentName)
// {
// foundContent = content;
// break;
// }
// }
// if (foundContent == null &&
// DeserializationCallback != null)
// {
// DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName);
// DeserializationCallback(this, e);
// foundContent = e.Content as DockableContent;
// }
// if (foundContent != null)
// {
// DetachContentFromDockingManager(foundContent);
// mainExistingDocumentPane.Items.Add(foundContent);
// foundContent.SetStateToDocument();
// //call custom layout persistence method
// foundContent.RestoreLayout(contentElement);
// }
// }
// }
//}
DocumentPane RestoreDocumentPaneLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments)
{
var documentPane = new DocumentPane();
if (mainElement.HasAttribute("ResizeWidth"))
ResizingPanel.SetResizeWidth(documentPane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth")));
if (mainElement.HasAttribute("ResizeHeight"))
ResizingPanel.SetResizeHeight(documentPane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight")));
if (mainElement.HasAttribute("EffectiveSize"))
ResizingPanel.SetEffectiveSize(documentPane, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize")));
foreach (XmlElement contentElement in mainElement.ChildNodes)
{
if (contentElement.Name == "DockableContent" &&
contentElement.HasAttribute("Name"))
{
DockableContent foundContent = null;
string contentName = contentElement.GetAttribute("Name");
foundContent = actualContents.FirstOrDefault(c => c.Name == contentName);
if (foundContent == null &&
DeserializationCallback != null)
{
DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName);
DeserializationCallback(this, e);
foundContent = e.Content as DockableContent;
//.........这里部分代码省略.........
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:101,代码来源:DockingManager.cs
示例9: EnsureContentNotEmpty
/// <summary>
/// This method ensure that content of this <see cref="DockingManager"/> is not empty
/// </summary>
void EnsureContentNotEmpty()
{
if (RestoringLayout)
return;
if (Content == null)
{
Content = new DocumentPane();
RefreshContents();
}
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:14,代码来源:DockingManager.cs
示例10: EnsurePanePositionIsValid
internal void EnsurePanePositionIsValid(DocumentPane pane)
{
if (pane == MainDocumentPane)
return;
//A document pane must be at maindocument pane level or deeper
if (MainDocumentPane.Parent == this)
{
throw new InvalidOperationException("A document pane can't be positioned at this level!");
}
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:11,代码来源:DockingManager.cs
示例11: DropInto
internal void DropInto(DockablePane paneDragged, DocumentPane paneToDropInto)
{
//if (paneToDropInto != MainDocumentPane)
// paneToDropInto = MainDocumentPane;
//transfer contents of dragged pane (contained in a FloatingWindow)
//to the pane which user select, taking care of setting contents state
//to Dock (using Dock() method of class DockablePane).
while (paneDragged.Items.Count > 0)
{
var contentToTransfer = paneDragged.RemoveContent(0);
paneToDropInto.Items.Add(contentToTransfer);
var dockContentToTransfer = contentToTransfer as DockableContent;
if (dockContentToTransfer != null)
dockContentToTransfer.SetStateToDocument();
contentToTransfer.Activate();
}
//paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1;
//paneToDropInto.Focus();
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:24,代码来源:DockingManager.cs
示例12: NewVerticalTabGroup
void NewVerticalTabGroup()
{
ManagedContent activeContent = SelectedItem as ManagedContent;
DocumentPane newContainerPane = new DocumentPane();
int indexOfDocumentInItsContainer = activeContent.ContainerPane.Items.IndexOf(activeContent);
activeContent.ContainerPane.RemoveContent(indexOfDocumentInItsContainer);
newContainerPane.Items.Add(activeContent);
GetManager().Anchor(newContainerPane, this, AnchorStyle.Right);
}
开发者ID:pusp,项目名称:o2platform,代码行数:11,代码来源:DocumentPane.cs
示例13: SetVisibilityOfMenuItems
private void SetVisibilityOfMenuItems(DocumentPane dp)
{
if (dp.Visibility == Visibility.Visible) // the value is set in ConvertBack of AvalonDockVisibilityConverter!!!
{
dp.Visibility = System.Windows.Visibility.Visible;
}
else
{
dp.Visibility = System.Windows.Visibility.Hidden;
}
foreach (DocumentContent dc in dockingManager.Documents)
{
if (dp.Visibility == Visibility.Visible)
{
dc.Show();
}
else
{
dc.Hide();
}
}
}
开发者ID:MartyIX,项目名称:SoTh,代码行数:23,代码来源:ViewMenuClicks.cs
示例14: Anchor
/// <summary>
/// Anchor a dockable pane (<see cref="DockablePane"/>) to a border of a document pane
/// </summary>
/// <param name="paneToAnchor">Pane to anchor</param>
/// <param name="relativePane">Pane relative</param>
/// <param name="anchor"></param>
public void Anchor(DockablePane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor)
{
//ensure that content property is not empty
EnsureContentNotEmpty();
if (anchor == AnchorStyle.None)
anchor = AnchorStyle.Right;
//get a reference to the resizingpanel container of relativePane
ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel;
DocumentPaneResizingPanel relativeDocumentPaneContainer = relativePane.GetParentDocumentPaneResizingPanel();
Orientation requestedOrientation =
(anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal;
if (relativePaneContainer == null)
{
Debug.Assert(relativePane.Parent == this);
this.Content = null;
relativeDocumentPaneContainer = new DocumentPaneResizingPanel();
relativeDocumentPaneContainer.Children.Add(relativePane);
relativePaneContainer = new ResizingPanel();
relativePaneContainer.Orientation = requestedOrientation;
this.Content = relativePaneContainer;
relativePaneContainer.Children.Add(relativeDocumentPaneContainer);
}
if (relativeDocumentPaneContainer == null)
{
relativeDocumentPaneContainer = new DocumentPaneResizingPanel();
relativeDocumentPaneContainer.Orientation = requestedOrientation;
int indexOfPaneToReplace = relativePaneContainer.Children.IndexOf(relativePane);
relativePaneContainer.Children.RemoveAt(indexOfPaneToReplace);
relativeDocumentPaneContainer.Children.Add(relativePane);
relativePaneContainer.Children.Insert(indexOfPaneToReplace, relativeDocumentPaneContainer);
}
relativePaneContainer = LogicalTreeHelper.GetParent(relativeDocumentPaneContainer) as ResizingPanel;
//Debug.Assert(relativePaneContainer is DocumentPaneResizingPanel, "By now we can't have a pane without a resizing panel containing it");
if (relativePaneContainer == null)
{
Debug.Assert(relativeDocumentPaneContainer.Parent == this);
this.Content = null;
relativePaneContainer = new ResizingPanel();
relativePaneContainer.Orientation = requestedOrientation;
this.Content = relativePaneContainer;
relativePaneContainer.Children.Add(relativeDocumentPaneContainer);
}
#region Create and setup container panel
if (relativePaneContainer != null)
{
//check if orientation is right
if (relativePaneContainer.Orientation != requestedOrientation)
{
//if the existing panel is not oriented as we want
//create a new one
ResizingPanel newPanel = new ResizingPanel();
newPanel.Orientation = requestedOrientation;
if (newPanel.Orientation == Orientation.Horizontal)
ResizingPanel.SetResizeHeight(newPanel, ResizingPanel.GetResizeHeight(relativePane));
else
ResizingPanel.SetResizeWidth(newPanel, ResizingPanel.GetResizeWidth(relativePane));
//replace relative pane in its' container panel
//with this new panel
int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativeDocumentPaneContainer);
relativePaneContainer.Children.Remove(relativeDocumentPaneContainer);
relativePaneContainer.Children.Insert(indexofRelativePane, newPanel);
//now we have a panel correctly placed in the tree
newPanel.Children.Add(relativeDocumentPaneContainer);
//use InsertChildRelativeTo function to add a resizingsplitter between
//the two children
newPanel.InsertChildRelativeTo(
paneToAnchor, relativeDocumentPaneContainer, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom);
}
else
{
//.........这里部分代码省略.........
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:101,代码来源:DockingManager.cs
示例15: RestoreResizingPanel
ResizingPanel RestoreResizingPanel(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane)
{
ResizingPanel panel = null;
if (mainElement.Name == "DocumentPaneResizingPanel")
panel = new DocumentPaneResizingPanel();
else
panel = new ResizingPanel();
if (mainElement.HasAttribute("Orientation"))
panel.Orientation = (Orientation)Enum.Parse(typeof(Orientation), mainElement.GetAttribute("Orientation"));
if (mainElement.HasAttribute("ResizeWidth"))
ResizingPanel.SetResizeWidth(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth")));
if (mainElement.HasAttribute("ResizeHeight"))
ResizingPanel.SetResizeHeight(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight")));
if (mainElement.HasAttribute("EffectiveSize"))
ResizingPanel.SetEffectiveSize(panel, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize")));
foreach (XmlElement childElement in mainElement.ChildNodes)
{
if (childElement.Name == "ResizingPanel" ||
childElement.Name == "DocumentPaneResizingPanel")
{
var childPanel = RestoreResizingPanel(childElement, actualContents, actualDocuments, ref mainDocumentPane);
if (childPanel.Children.Count > 0)
{
panel.Children.Add(childPanel);
}
else
{
Debug.WriteLine("Found empty ResizingPanel in stored layout, it will be discarded.");
}
}
#region Restore DockablePane
else if (childElement.Name == "DockablePane")
{
var pane = RestoreDockablePaneLayout(childElement, actualContents, actualDocuments);
//restore dockable panes even if no contents are inside (an hidden content could refer this pane in SaveStateAndPosition)
panel.Children.Add(pane);
}
#endregion
#region Restore Contents inside a DocumentPane
else if (childElement.Name == "DocumentPane")
{
var documentPane = RestoreDocumentPaneLayout(childElement, actualContents, actualDocuments);
bool isMainDocumentPane = false;
if (childElement.HasAttribute("IsMain"))
isMainDocumentPane = XmlConvert.ToBoolean(childElement.GetAttribute("IsMain"));
if (documentPane.Items.Count > 0 ||
isMainDocumentPane)
panel.Children.Add(documentPane);
if (isMainDocumentPane)
{
if (mainDocumentPane != null)
throw new InvalidOperationException("Main document pane is set more than one time");
mainDocumentPane = documentPane;
}
}
#endregion
}
return panel;
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:71,代码来源:DockingManager.cs
示例16: Register
public void Register( RenderWindowManager rwm )
{
this.rwm = rwm;
//var tabItem = new TabItem();
//tabItem.Header = "Pokus";
// var tabItems = TabControl.Items;
var resHorizontalPanel = new ResizingPanel()
{
Orientation = Orientation.Horizontal
};
var resVerticalPanel = new ResizingPanel()
{
Orientation = Orientation.Vertical
};
/*
OpenGLWindow tempGLWin = rwm.RenderWindows[0].GlWindows[0];
var wfh = new WindowsFormsHost();
wfh.Child = tempGLWin;
var dockPane = new DockablePane();
var documentPane = new DocumentPane();
dockPane.Items.Add( new DockableContent()
{
Name = "classesContent",
Title = "Classes"
} );
*/
var dockPane = new DockablePane();
var documentPane = new DocumentPane();
foreach ( var openglWindow in rwm.RenderWindows )
{
var formHost = new WindowsFormsHost()
{
Child = openglWindow.GlWindows[0]
};
documentPane.Items.Add
(
new DocumentContent()
{
Content = formHost,
Title = "a"
}
);
}
//var a = new DocumentContent();
//a.Content = wfh;
//a.Title = "Raycast";
//documentPane.Items.Add( a );
//documentPane.Items.Add( new DocumentContent()
//{
// Title = "My Document!"
//} );
//dockPane.Items.Add( new DockableContent()
//{
// Name = "classesContent",
// Title = "Logs",
//} );
//var logDockPane = new DockablePane();
//logDockPane.Items.Add( new DockableContent()
//{
// Name = "classesContent",
// Title = "Logs",
//}
//);
//resVerticalPanel.Children.Add( logDockPane );
ResizingPanel XXX = DockingManager.Content as ResizingPanel;
XXX.Children.Add( dockPane );
XXX.Children.Add( documentPane );
//resHorizontalPanel.Children.Add( logDockPane);
DockingManager.Content = XXX;
}
开发者ID:msup,项目名称:RayEngine,代码行数:92,代码来源:WindowManager.cs
示例17: switch
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
#line 8 "..\..\Window4.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnAddDocuments_Click);
#line default
#line hidden
return;
case 2:
#line 9 "..\..\Window4.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnRemoveCurrent_Click);
#line default
#line hidden
return;
case 3:
#line 10 "..\..\Window4.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnRemoveAll_Click);
#line default
#line hidden
return;
case 4:
this.dockingManager = ((AvalonDock.DockingManager)(target));
#line 12 "..\..\Window4.xaml"
this.dockingManager.Loaded += new System.Windows.RoutedEventHandler(this.dockingManager_Loaded);
#line default
#line hidden
#line 12 "..\..\Window4.xaml"
this.dockingManager.RequestDocumentClose += new System.EventHandler<AvalonDock.RequestDocumentCloseEventArgs>(this.dockingManager_RequestDocumentClose);
#line default
#line hidden
return;
case 5:
this._documentHost = ((AvalonDock.DocumentPane)(target));
return;
}
this._contentLoaded = true;
}
开发者ID:Reticulatas,项目名称:AvalonDock,代码行数:48,代码来源:Window4.g.cs
示例18: switch
//.........这里部分代码省略.........
#line 96 "..\..\Demo.xaml"
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked);
#line default
#line hidden
return;
case 9:
#line 97 "..\..\Demo.xaml"
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked);
#line default
#line hidden
return;
case 10:
#line 99 "..\..\Demo.xaml"
((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ResetColors_Clicked);
#line default
#line hidden
return;
case 11:
this.TestContainer = ((System.Windows.Controls.ContentControl)(target));
return;
case 12:
this._dockingManager = ((AvalonDock.DockingManager)(target));
return;
case 13:
this._propertiesWindow = ((AvalonDock.DockableContent)(target));
return;
case 14:
this._documentsHost = ((AvalonDock.DocumentPane)(target));
return;
case 15:
this.docHome = ((AvalonDock.DocumentContent)(target));
#line 124 "..\..\Demo.xaml"
this.docHome.Closing += new System.EventHandler<System.ComponentModel.CancelEventArgs>(this.doc_Closing);
#line default
#line hidden
return;
case 16:
this.NewDocuments = ((System.Windows.Documents.Hyperlink)(target));
#line 194 "..\..\Demo.xaml"
this.NewDocuments.Click += new System.Windows.RoutedEventHandler(this.NewDocuments_Click);
#line default
#line hidden
return;
case 17:
this.ShowProperties = ((System.Windows.Documents.Hyperlink)(target));
#line 196 "..\..\Demo.xaml"
this.ShowProperties.Click += new System.Windows.RoutedEventHandler(this.ShowProperties_Click);
#line default
#line hidden
return;
case 18:
this.ShowProperties_AutoHide = ((System.Windows.Documents.Hyperlink)(target));
#line 197 "..\..\Demo.xaml"
开发者ID:Reticulatas,项目名称:AvalonDock,代码行数:67,代码来源:Demo.g.cs
示例19: ClonePane
public override Pane ClonePane()
{
DocumentPane paneToAnchor = new DocumentPane();
////transfer the resizing panel sizes
//paneToAnchor.SetValue(ResizingPanel.ResizeWidthProperty,
// HostedPane.GetValue(ResizingPanel.ResizeWidthProperty));
//paneToAnchor.SetValue(ResizingPanel.ResizeHeightProperty,
// HostedPane.GetValue(ResizingPanel.ResizeHeightProperty));
ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height));
//transfer contents from hosted pane in the floating window and
//the new created dockable pane
while (HostedPane.Items.Count > 0)
{
paneToAnchor.Items.Add(
HostedPane.RemoveContent(0));
}
return paneToAnchor;
}
开发者ID:mousetwentytwo,项目名称:test,代码行数:22,代码来源:DocumentFloatingWindow.cs
示例20: SaveLayout
void SaveLayout(XmlWriter xmlWriter, DocumentPane pane)
{
if (pane.Items.Count == 0 && !pane.IsMainDocumentPane.GetValueOrDefault())
return;
xmlWriter.WriteStartElement("DocumentPane");
if (pane.IsMainDocumentPane.GetValueOrDefault())
xmlWriter.WriteAttributeString("IsMain", "true");
if (pane.Items.Count > 1)
xmlWriter.WriteAttributeString("SelectedIndex", XmlConvert.ToString(pane.SelectedIndex));
xmlWriter.WriteAttributeString("ResizeWidth", ResizingPanel.GetResizeWidth(pane).ToString());
xmlWriter.WriteAttributeString("ResizeHeight", ResizingPanel.GetResizeHeight(pane).ToString());
xmlWriter.WriteAttributeString("EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(pane)));
foreach (ManagedContent content in pane.Items)
{
if (content is DockableContent)
{
var dockableContent = content as DockableContent;
SaveLayout(xmlWriter, dockableContent);
}
else if (content is DocumentContent)
{
var documentContent = content as DocumentContent;
SaveLayout(xmlWriter, documentContent);
}
}
xmlWriter.WriteEndElement();
}
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:33,代码来源:DockingManager.cs
注:本文中的AvalonDock.DocumentPane类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论