Microsoft.Silverlight.Testing.Controls.TreeViewItem.OnApplyTemplate C# (CSharp) 메소드

OnApplyTemplate() 공개 메소드

Builds the visual tree for the T:Microsoft.Silverlight.Testing.Controls.TreeViewItem control when a new control template is applied.
public OnApplyTemplate ( ) : void
리턴 void
        public override void OnApplyTemplate()
        {
            ItemsControlHelper.OnApplyTemplate();

            // Get the template parts
            ExpanderButton = GetTemplateChild(ExpanderButtonName) as ToggleButton;
            HeaderElement = GetTemplateChild(HeaderName) as FrameworkElement;

            // Try to get the ExpansionStates visual state group
            ExpansionStateGroup = VisualStates.TryGetVisualStateGroup(this, VisualStates.GroupExpansion);

            Interaction.OnApplyTemplateBase();
            base.OnApplyTemplate();
        }