Microsoft.Phone.Controls.TransitionFrame.OnApplyTemplate C# (CSharp) Method

OnApplyTemplate() public method

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application.
public OnApplyTemplate ( ) : void
return void
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _firstContentPresenter = GetTemplateChild(FirstTemplatePartName) as ContentPresenter;
            _secondContentPresenter = GetTemplateChild(SecondTemplatePartName) as ContentPresenter;
            _newContentPresenter = _secondContentPresenter;
            _oldContentPresenter = _firstContentPresenter;
            _useFirstAsNew = true;

            _readyToTransitionToNewContent = true;

            if (Content != null)
            {
                OnContentChanged(null, Content);
            }
        }