本文整理汇总了C#中INestedPanesContainer类的典型用法代码示例。如果您正苦于以下问题:C# INestedPanesContainer类的具体用法?C# INestedPanesContainer怎么用?C# INestedPanesContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
INestedPanesContainer类属于命名空间,在下文中一共展示了INestedPanesContainer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DockTo
public DockPane DockTo(INestedPanesContainer container, DockPane previousPane, DockAlignment alignment, double proportion)
{
if (container == null)
throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
if (container.IsFloat == this.IsFloat)
{
InternalAddToDockList(container, previousPane, alignment, proportion);
return this;
}
IDockContent firstContent = GetFirstContent(container.DockState);
if (firstContent == null)
return null;
DockPane pane;
DockPanel.DummyContent.DockPanel = DockPanel;
if (container.IsFloat)
pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true);
else
pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true);
pane.DockTo(container, previousPane, alignment, proportion);
SetVisibleContentsToPane(pane);
DockPanel.DummyContent.DockPanel = null;
return pane;
}
示例2: ResumeRefreshStateChange
private void ResumeRefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
{
ResumeRefreshStateChange();
RefreshStateChange(oldContainer, oldDockState);
}
示例3: RefreshStateChange
private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
{
lock (this)
{
if (IsRefreshStateChangeSuspended)
return;
SuspendRefreshStateChange();
}
DockPanel.SuspendLayout(true);
IDockContent contentFocused = GetFocusedContent();
if (contentFocused != null)
DockPanel.SaveFocus();
SetParent();
if (ActiveContent != null)
ActiveContent.DockHandler.SetDockState(ActiveContent.DockHandler.IsHidden, DockState, ActiveContent.DockHandler.Pane);
foreach (IDockContent content in Contents)
{
if (content.DockHandler.Pane == this)
content.DockHandler.SetDockState(content.DockHandler.IsHidden, DockState, content.DockHandler.Pane);
}
if (oldContainer != null)
{
Control oldContainerControl = (Control)oldContainer;
if (oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed)
oldContainerControl.PerformLayout();
}
if (DockHelper.IsDockStateAutoHide(oldDockState))
DockPanel.RefreshActiveAutoHideContent();
if (NestedPanesContainer.DockState == DockState)
((Control)NestedPanesContainer).PerformLayout();
if (DockHelper.IsDockStateAutoHide(DockState))
DockPanel.RefreshActiveAutoHideContent();
if (DockHelper.IsDockStateAutoHide(oldDockState) ||
DockHelper.IsDockStateAutoHide(DockState))
{
DockPanel.RefreshAutoHideStrip();
DockPanel.PerformLayout();
}
ResumeRefreshStateChange();
if (contentFocused != null)
contentFocused.DockHandler.Activate();
DockPanel.ResumeLayout(true, true);
if (oldDockState != DockState)
OnDockStateChanged(EventArgs.Empty);
}
示例4: InternalAddToDockList
private void InternalAddToDockList(INestedPanesContainer container, DockPane prevPane, DockAlignment alignment, double proportion)
{
if ((container.DockState == DockState.Float) != IsFloat)
throw new InvalidOperationException(Strings.DockPane_DockTo_InvalidContainer);
int count = container.NestedPanes.Count;
if (container.NestedPanes.Contains(this))
count --;
if (prevPane == null && count > 0)
throw new InvalidOperationException(Strings.DockPane_DockTo_NullPrevPane);
if (prevPane != null && !container.NestedPanes.Contains(prevPane))
throw new InvalidOperationException(Strings.DockPane_DockTo_NoPrevPane);
if (prevPane == this)
throw new InvalidOperationException(Strings.DockPane_DockTo_SelfPrevPane);
INestedPanesContainer oldContainer = NestedPanesContainer;
DockState oldDockState = DockState;
container.NestedPanes.Add(this);
NestedDockingStatus.SetStatus(container.NestedPanes, prevPane, alignment, proportion);
if (DockHelper.IsDockWindowState(DockState))
m_dockState = container.DockState;
RefreshStateChange(oldContainer, oldDockState);
}
示例5: RefreshStateChange
private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
{
lock(this){
if(this.IsRefreshStateChangeSuspended){
return;
}
this.SuspendRefreshStateChange();
}
this.DockPanel.SuspendLayout(true);
IDockContent contentFocused = this.GetFocusedContent();
if(contentFocused != null){
this.DockPanel.SaveFocus();
}
this.SetParent();
if(this.ActiveContent != null){
this.ActiveContent.DockHandler.SetDockState(this.ActiveContent.DockHandler.IsHidden, this.DockState,
this.ActiveContent.DockHandler.Pane);
}
foreach(IDockContent content in this.Contents){
if(content.DockHandler.Pane == this){
content.DockHandler.SetDockState(content.DockHandler.IsHidden, this.DockState,
content.DockHandler.Pane);
}
}
if(oldContainer != null){
Control oldContainerControl = (Control)oldContainer;
if(oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed){
oldContainerControl.PerformLayout();
}
}
if(DockHelper.IsDockStateAutoHide(oldDockState)){
this.DockPanel.RefreshActiveAutoHideContent();
}
if(this.NestedPanesContainer.DockState == this.DockState){
((Control)this.NestedPanesContainer).PerformLayout();
}
if(DockHelper.IsDockStateAutoHide(this.DockState)){
this.DockPanel.RefreshActiveAutoHideContent();
}
if(DockHelper.IsDockStateAutoHide(oldDockState) || DockHelper.IsDockStateAutoHide(this.DockState)){
this.DockPanel.RefreshAutoHideStrip();
this.DockPanel.PerformLayout();
}
this.ResumeRefreshStateChange();
if(contentFocused != null){
contentFocused.DockHandler.Activate();
}
this.DockPanel.ResumeLayout(true, true);
if(oldDockState != this.DockState){
this.OnDockStateChanged(EventArgs.Empty);
}
}