コード例 #1
0
        private void EnsureWrappedControl()
        {
            if (!_hasLoaded)
            {
                _hasLoaded = true;
                Assertion.IsNotNull(_controlToWrap);

                _stateModificationStrategy.LoadControlState(this, _memberCaller);
                _stateModificationStrategy.LoadViewState(this, _memberCaller);

                _memberCaller.SetControlState(_controlToWrap, ControlState.Constructed);
                Control controlToWrap = _controlToWrap;
                _controlToWrap = null;
                Controls.Add(controlToWrap);
            }
        }