[
{ "Key": "PageTitle", "Value": "User controls" },
{ "Key": "HeaderTitle", "Value": "User controls" },
{ "Key": "HeaderDescription", "Value": "In the user controls can place other controls and elements. User controls can contain properties and event handlers. Objects of user controls can easily be described in the markup." },
{ "Key": "IntroductionText1", "Value": "User controls can be usually includes files or represent complex objects." },
{ "Key": "IntroductionText2", "Value": "User controls can not use the directives, and they can not have their own localization files." },
{ "Key": "IntroductionText3", "Value": "User controls can contain any client-side and server-side code." },
{ "Key": "IntroductionText4", "Value": "Each instance of an user control can have its own, unique, property values." },
{ "Key": "IntroductionText5", "Value": "The properties of an user controls may refer to other classes and are easily described in the <strong>HTML</strong>." },
{ "Key": "IntroductionText6", "Value": "User controls can be placed in templates and content pages, without any restrictions." },
{ "Key": "RegistrationAndPlacement", "Value": "Registration and placement of controls" },
{ "Key": "UserControlsAsIncludeFiles", "Value": "User controls as a replacement for include files" },
{ "Key": "ObjectModel", "Value": "Object model" },
{ "Key": "RegistrationAndPlacementText1", "Value": "Before placing the controls on the page, they need to register. This is done with the help of the directive <a href=\"/pages.php${Lang}#directive-register\">#Register</a>." },
{ "Key": "RegistrationAndPlacementText2", "Value": "Register should be only those controls that are required on a specific page." },
{ "Key": "RegistrationAndPlacementText3", "Value": "The following example shows the registration <code>Message</code> control." },
{ "Key": "RegistrationAndPlacementText4", "Value": "The <code>Src</code> parameter contains the path to the main file of the control. The <code>TagPrefix</code> and <code>TagName</code> contains name of the control." },
{ "Key": "RegistrationAndPlacementText5", "Value": "The following example shows the placement on the page multiple instances of the <code>Message</code> control." },
{ "Key": "ExampleMessage1", "Value": "Hello world! This is message #1!" },
{ "Key": "ExampleMessage2", "Value": "This is message #2!" },
{ "Key": "ExampleMessage3", "Value": "Such messages can be any number!" },
{ "Key": "RegistrationAndPlacementText6", "Value": "As a rule, the <code>TagPrefix</code> is set to <strong>php</strong> and <code>TagName</code> is the name of the control, but it is not a requirement." },
{ "Key": "RegistrationAndPlacementText7", "Value": "The following example illustrates the use of non-standard values of the <code>TagPrefix</code> and <code>TagName</code>." },
{ "Key": "RegistrationAndPlacementText8", "Value": "On one page can place an unlimited number of user controls with different properties." },
{ "Key": "UserControlsAsIncludeFilesText1", "Value": "User controls can be included files." },
{ "Key": "UserControlsAsIncludeFilesText2", "Value": "The following example shows simple user control." },
{ "Key": "SimpleExampleText1", "Value": "The simple user control." },
{ "Key": "SimpleExampleText2", "Value": "You can use any tags and php code." },
{ "Key": "UserControlsAsIncludeFilesText3", "Value": "For controls have no class, used the <code>Control</code> class by default. This allows to use properties with a text values for each control instance." },
{ "Key": "UserControlsAsIncludeFilesText4", "Value": "The following example shows the source code of the <code>Panel</code>. The control consists of only server-side code and markup, and is not explicitly defined class. The <code>Panel</code> expects values for two anonymous property: <code>Title</code> and <code>Content</code>. The values for these properties can be passed when placing the control on the page." },
{ "Key": "ObjectModelText1", "Value": "As in the case of content pages, at the object model, the main control file must contain a class; marking is located in a <strong>.html.php</strong> file." },
{ "Key": "ObjectModelText2", "Value": "The following example shows the <code>Message</code> control, which is used at this site. Class of the control contained in the <strong>Message.php</strong>, the markup - <strong>Message.html.php</strong>." },
{ "Key": "ObjectModelText3", "Value": "Any public properties of the control can specify the value in the <strong>HTML</strong>, or programmatically in the <a href=\"/pages.php${Lang}#load\">Load</a> event handler." },
{ "Key": "ObjectModelText4", "Value": "Programmatic access to specific controls carried out by the ID. By default, each control ID is assigned automatically. Control identifier you can manually specified to the <code>ID</code> property." },
{ "Key": "ObjectModelText5", "Value": "IDs are not checked for uniqueness!" },
{ "Key": "ObjectModelText6", "Value": "The following example illustrates explicit definition identifiers for two instances of the <code>Message</code>." },
{ "Key": "Example2Message1", "Value": "Message #1" },
{ "Key": "Example2Message2", "Value": "Other message" },
{ "Key": "ObjectModelText7", "Value": "You can change message text for this controls in the <a href=\"/pages.php${Lang}#load\">Load</a> event handler of the page." },
{ "Key": "Example3Message1", "Value": "The text is set programmatically." },
{ "Key": "Example3Message2", "Value": "and here, too" },
{ "Key": "ObjectModelText8", "Value": "Properties controls may contain links to other members or to represent the collection. And all this can be described in the markup!" },
{ "Key": "ObjectModelText9", "Value": "For example, this site uses <code>TabControl</code> control, which comprises: the markup file <strong>TabControl.html.php</strong>, the class files <code>TabControl</code> and <code>TabItem</code>. The <code>TabItem</code> represents the <code>TabControl</code>. In the <code>TabControl</code> class, the <code>TabItem</code> class is an array in the <code>Items</code> property." },
{ "Key": "ObjectModelText10", "Value": "In <strong>HTML</strong>, the property <code>Items</code> must be presented in the same name tag with nested instances of the <code>TabItem</code>." },
{ "Key": "ObjectModelText11", "Value": "The following example shows a placement instance of the <code>TabControl</code> on the page." },
{ "Key": "LocalizationText1", "Value": "User controls do not have their own localization files. They use global resources or resources of page on which are placed." },
{ "Key": "ClassControlText1", "Value": "The <code>\\Nemiro\\UI\\Control</code> class (hereinafter <code>Control</code>) represents a user control." },
{ "Key": "ClassControlText2", "Value": "From the <code>Control</code> ?class must inherit the classes of all of user controls." },
{ "Key": "ClassControlText3", "Value": "If user control do not have a class, then uses a default instance of the <code>Control</code>." },
{ "Key": "ClassControlText4", "Value": "The following code snippet shows an inheritance <code>Menu</code> class from the base class <code>Control</code>." },
{ "Key": "PropertiesControlText1", "Value": "The <code>Control</code> class has the following public properties." },
{ "Key": "ControlDefaultValues", "Value": "The default values collection.<br />Used for technical purposes." },
{ "Key": "ControlSource", "Value": "The path to the main file of the control." },
{ "Key": "ControlTagPrefix", "Value": "The name prefix of the control." },
{ "Key": "ControlTagName", "Value": "The control name." },
{ "Key": "ControlName", "Value": "The full name, with prefix. For example: <code>php:Message</code>." },
{ "Key": "ControlParent", "Value": "Reference to parent." },
{ "Key": "ControlBody", "Value": "The content of the user control. It is used for output to the page.<br />Value of the property can be overridden in a handler of the <a href=\"#loadComplete\">LoadComplete</a> event." },
{ "Key": "PropertiesControlText2", "Value": "In addition, there is a virtual property <code>Content</code>, which can be defined in the descendant classes." },
{ "Key": "PropertiesControlText3", "Value": "The <code>Content</code> property is used as the value of the content of the control when the markup contains a closing tag for this control." },
{ "Key": "PropertiesControlText4", "Value": "The following example shows an explicit and implicit set a value for the <code>Content</code> property." },
{ "Key": "PropertiesControlText5", "Value": "This text is implicitly passed to the Content property." },
{ "Key": "PropertiesControlText6", "Value": "This text explicitly passed to the Content property." },
{ "Key": "EventsControlText1", "Value": "User controls have two events: <code>Load</code> and <code>LoadComplete</code>." },
{ "Key": "EventsControlText2", "Value": "Both events take place after the event <a href=\"/pages.php${Lang}#load\">Load</a> and before the event <a href=\"/pages.php${Lang}#load?omplete\">LoadComplete</a> of the page." },
{ "Key": "EventLoadText1", "Value": "The <code>Load</code> event occurs before building data to output." },
{ "Key": "EventLoadText2", "Value": "In this event, in theory, you can change the <code>Source</code>, but it is better not to do so." },
{ "Key": "EventLoadText3", "Value": "<code>Load</code> event handler can be useful to dynamically change the values of the custom properties of the control." },
{ "Key": "EventLoadText4", "Value": "The following example shows the change in value of the <code>Content</code> property for the stripped-down version of the <code>Message</code> control." },
{ "Key": "ExampleEventsMessageText1", "Value": "Text" },
{ "Key": "ExampleEventsMessageText2", "Value": "Message" },
{ "Key": "EventLoadCompleteText1", "Value": "The <code>LoadComplete</code> event occurs after build the data." },
{ "Key": "EventLoadCompleteText2", "Value": "In this event handler, you can change the value of the <code>Body</code>, which contains data about the control, prepared for the output on the page." },
{ "Key": "EventLoadCompleteText3", "Value": "The following example illustrates an override the value of the <code>Body</code> property for the stripped-down version of the <code>Message</code> control." }
]
|