From RAD Studio API Documentation
Jump to: navigation, search



TPresentationProxyFactory = class


class PASCALIMPLEMENTATION TPresentationProxyFactory : public System::TObject


Type Visibility Source Unit Parent
class public
FMX.Presentation.Factory FMX.Presentation.Factory


The factory for creating presentation proxies for presented controls.

Only one instance of TPresentationProxyFactory can exist at each moment. This instance is referenced by the Current property and the first access to Current creates the current TPresentationProxyFactory instance.

Each unit defining a 'styled' or 'native' presentation of a presented control, in its initialization section, calls the Register method to register a <PresentationName, PresentationProxyClass> pair corresponding to the defined presentation. As the result <PresentationName, PresentationProxyClass> pairs are registered for all presentations, which are included into the project. Therefore, the Presentations property in the TPresentationProxyFactory used in the project contains the collection of all <PresentationName, PresentationProxyClass> pairs for all presentations included into the project.

CreatePresentationProxy gets from Presentations the PresentationProxyClass, associated with the inquired PresentationName, and creates the corresponding PresentationProxy. Call CreatePresentationProxy to create the PresentationProxy for each presentation used with the presented control. Each created PresentationProxy provides communication among the presented control, its data model, and its presentation.

See Also