本文整理汇总了C#中Slice.ShowSubControls方法的典型用法代码示例。如果您正苦于以下问题:C# Slice.ShowSubControls方法的具体用法?C# Slice.ShowSubControls怎么用?C# Slice.ShowSubControls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slice
的用法示例。
在下文中一共展示了Slice.ShowSubControls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeSliceVisible
/// <summary>
/// Make a slice visible, either because it needs to be drawn, or because it needs to be
/// focused.
/// </summary>
/// <param name="tci"></param>
internal static void MakeSliceVisible(Slice tci)
{
// It intersects the screen so it needs to be visible.
if (!tci.Visible)
{
int index = tci.IndexInContainer;
// All previous slices must be "visible". Otherwise, the index of the current
// slice gets changed when it becomes visible due to what is presumably a bug
// in the dotnet framework.
for (int i = 0; i < index; ++i)
{
Control ctrl = tci.ContainingDataTree.Controls[i];
if (ctrl != null && !ctrl.Visible)
ctrl.Visible = true;
}
tci.Visible = true;
Debug.Assert(tci.IndexInContainer == index,
String.Format("MakeSliceVisible: slice '{0}' at index({2}) should not have changed to index ({1})." +
" This can occur when making slices visible in an order different than their order in DataTree.Controls. See LT-7307.",
(tci.ConfigurationNode != null && tci.ConfigurationNode.OuterXml != null ? tci.ConfigurationNode.OuterXml : "(DummySlice?)"),
tci.IndexInContainer, index));
// This was moved out of the Control setter because it prematurely creates
// root boxes (because it creates a window handle). The embedded control shouldn't
// need an accessibility name before it is visible!
if (tci.Label != null && tci.Label.Length > 0 && tci.Control != null)
tci.Control.AccessibilityObject.Name = tci.Label;// + "ZZZ_Slice";
}
tci.ShowSubControls();
}