internal override void UpdateBehaviors (bool treeSupportsScroll)
{
parentTreeKnownToSupportScroll = treeSupportsScroll;
if (treeView.CheckBoxes &&
GetBehavior (TogglePatternIdentifiers.Pattern) == null)
SetBehavior (TogglePatternIdentifiers.Pattern,
new ToggleProviderBehavior (this));
else if (!treeView.CheckBoxes)
SetBehavior (TogglePatternIdentifiers.Pattern,
null);
if (treeSupportsScroll && treeView.Enabled &&
GetBehavior (ScrollItemPatternIdentifiers.Pattern) == null)
SetBehavior (ScrollItemPatternIdentifiers.Pattern,
new ScrollItemProviderBehavior (this));
else if (!treeSupportsScroll || !treeView.Enabled)
SetBehavior (ScrollItemPatternIdentifiers.Pattern,
null);
if (GetBehavior (ExpandCollapsePatternIdentifiers.Pattern) == null)
SetBehavior (ExpandCollapsePatternIdentifiers.Pattern,
new ExpandCollapeProviderBehavior (this));
if (treeView.LabelEdit &&
GetBehavior (ValuePatternIdentifiers.Pattern) == null)
SetBehavior (ValuePatternIdentifiers.Pattern,
new ValueProviderBehavior (this));
else if (!treeView.LabelEdit)
SetBehavior (ValuePatternIdentifiers.Pattern,
null);
if (GetBehavior (SelectionItemPatternIdentifiers.Pattern) == null)
SetBehavior (SelectionItemPatternIdentifiers.Pattern,
new SelectionItemProviderBehavior (this));
base.UpdateBehaviors (treeSupportsScroll);
}