Component Writer's Guide :: Control states
From RadPHP XE2 Documentation
Components can be in an specific state, depending if are rendered inside the IDE or are being loaded, to check about this state, use the ControlState property and test using binary operators.
if (($this->ControlState & csDesigning) != csDesigning) { //Write code here that must be executed when the component //is not rendered inside the IDE }
if (($this->ControlState & csLoading)==csLoading) { //Component is being loaded from the .xml.php //or restored from the session }