本文整理汇总了C#中System.Windows.FrameworkElement.EndInit方法的典型用法代码示例。如果您正苦于以下问题:C# FrameworkElement.EndInit方法的具体用法?C# FrameworkElement.EndInit怎么用?C# FrameworkElement.EndInit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.FrameworkElement
的用法示例。
在下文中一共展示了FrameworkElement.EndInit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClearDimensions
private static void ClearDimensions(FrameworkElement tabItem)
{
// remove any size restrictions from the Header,
// this is because the TabControl's size restriction properties takes precedence over
// the individual tab items
// eg, if the TabControl sets the TabItemMaxWidth property to 300, but the Header
// has a minWidth of 400, the TabControls value of 300 should be used
tabItem.BeginInit();
tabItem.Height = double.NaN;
tabItem.Width = double.NaN;
tabItem.MaxHeight = double.PositiveInfinity;
tabItem.MaxWidth = double.PositiveInfinity;
tabItem.MinHeight = 0;
tabItem.MinWidth = 0;
tabItem.EndInit();
}
示例2: NewNodeEndInit
/// <summary>
/// Call EndInit on the newly-created node to fire the
/// "Initialized" event.
/// </summary>
private static void NewNodeEndInit( bool treeNodeIsFE,
FrameworkElement treeNodeFE, FrameworkContentElement treeNodeFCE )
{
if( treeNodeIsFE )
{
// Mark the beginning of the initialization phase
treeNodeFE.EndInit();
}
else
{
// Mark the beginning of the initialization phase
treeNodeFCE.EndInit();
}
}