From Appmethod Libraries
Jump to: navigation, search


Object Pascal

TPresentedControl = class(TStyledControl)


class PASCALIMPLEMENTATION TPresentedControl : public Fmx::Controls::TStyledControl


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


Base class for controls that provide a separation between data and presentation.

The following properties of presented controls allow this separation:

  • The Model property, which is a data model that contains the data of the control.
  • The PresentationProxy property. The presentation proxy allows a presented control to exchange information with the presentation layer, which is the actual responsible of the visual presentation of the control.

The presented control instantiates both of these properties automatically at run time. An empty model is created as soon as you create an instance of a presented control, and the presentation proxy is created when your presented control loads.

Reimplement DefineModelClass to determine the class that a presented control uses for its data model. Reimplement DefinePresentationName to determine the name of the default presentation proxy that a presented control uses. To define a custom name for the presentation proxy of specific instances of a presented control, handle the OnPresentationNameChoosing event instead.

The ControlType property determines whether the presentation layer represents your control using a native control of the platform where your application is running (Platform), or the presentation layer represents your control using the default FireMonkey style system (Styled). On platforms for which FireMonkey does not provide native presentation support, FireMonkey uses the default styled presentation regardless of the value of the ControlType property.

See Also