Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DirectX Styles are defined as features of a Visual Style. They can be thought of as much the same as cascading style sheet, with multiple styles defined in one place.

The following example shows a few basic styles:
Image Removed
Image Added

Unlike Visual Styles, DirectX Styles only affect the features specifically referenced in their definition.

DirectX Styles are made up of background and foreground features. Only the foreground features - TextColor, Font and ForegroundBrush - are adopted by child controls. This is because borders and a background brush applied to a panel are usually not required on child controls. Instead, panels and labels are transparent by default, allowing a base background to be visible. If you want the background and border to repeat on each control, you can explicitly apply the Style.