Back to Devexpress

TcxCustomLookAndFeelController.NativeStyle Property

vcl-cxlookandfeels-dot-tcxcustomlookandfeelcontroller-70ee3854.md

latest3.6 KB
Original Source

TcxCustomLookAndFeelController.NativeStyle Property

Specifies if all forms and DevExpress controls in an application use operating system-dependent draw routines to render all UI elements.

Declaration

delphi
property NativeStyle: Boolean read; write; default cxDefaultLookAndFeelNativeStyle;

Property Value

TypeDefaultDescription
BooleancxDefaultLookAndFeelNativeStyle

True if application forms and DevExpress controls use operating system-dependent draw routines; otherwise, False.

|

Remarks

Set the NativeStyle property to True or False to enable or disable the operating system-dependent style for your application[1]. The LookAndFeel.NativeStyle property of an individual control has priority over the NativeStyle property.

Important

A skin whose name is assigned to the SkinName property affects all application forms and DevExpress controls only if the NativeStyle property is set to False.

Code Examples: Apply a Skin and its Palette

The following code example applies the WXICompact skin and its Sharpness palette to an application:

delphi
dxSkinController1.BeginUpdate;
  try
    dxSkinController1.UseSkins := True;
    dxSkinController1.NativeStyle := False;
    dxSkinController1.SkinName := 'WXICompact';
    dxSkinController1.SkinPaletteName := 'Sharpness';
  finally
    dxSkinController1.EndUpdate;
  end;
cpp
dxSkinController1->BeginUpdate();
  try
  {
    dxSkinController1->UseSkins = true;
    dxSkinController1->NativeStyle = false;
    dxSkinController1->SkinName = "WXICompact";
    dxSkinController1->SkinPaletteName = "Sharpness";
  }
  __finally
  {
    dxSkinController1->EndUpdate();
  }

Alternatively, you can call the SetSkin procedure:

delphi
dxSkinController1.BeginUpdate;
  try
    dxSkinController1.NativeStyle := False;
    dxSkinController1.SetSkin('WXICompact', 'Sharpness');
  finally
    dxSkinController1.EndUpdate;
  end;
cpp
dxSkinController1->BeginUpdate();
  try
  {
    dxSkinController1->NativeStyle = false;
    dxSkinController1->SetSkin("WXICompact", "Sharpness");
  }
  __finally
  {
    dxSkinController1->EndUpdate();
  }

Default Value

The NativeStyle property’s default value is the cxDefaultLookAndFeelNativeStyle global constant.

Footnotes

  1. The TdxRibbon control never uses the native style. If the application does not use DevExpress skins through the TdxSkinController component, the TdxRibbon control uses one of its built-in skins.

See Also

TcxCustomLookAndFeelController Class

TcxCustomLookAndFeelController Members

cxLookAndFeels Unit