Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Collapse]Layout Management
   [Expand]Dock Windows
   [Collapse]Tile and Layout
    [Expand]Layout and Data Layout Controls
     Tile Layout Control
     Dock Layout Control
     Flow Layout Control
    [Expand]Common Features
    [Collapse]Examples
      How to: Build Non-Linear Layout via LayoutControl
      How to: Customize style of LayoutGroup's header
      How to: Change styles of labels for individual or all layout items
      How to: Specify DataTemplate used to render labels of LayoutItems
      How to: Save and restore layout of items in LayoutControl
      How to: Build a compound layout
      How to: Create a Tile Layout Control
      How to: Display items in FlowLayoutControl and enable maximization feature
      How to: Enable horizontal and vertical item sizing within DockLayoutControl
      How to: Use DockLayoutControl
   [Expand]Tab Control
   [Expand]Carousel
    Book Control
    Workspace Manager
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Change styles of labels for individual or all layout items

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2258.

The following code shows how to change the styles of labels for individual layout items, or all of them. The style is changed via the LayoutItem.LabelStyle property.


Styles of layout items' labels can be customized via the LayoutItem.LabelStyle property. This example demonstrates two approaches to changing the LabelStyle property:
- for all layout items belonging to a container - via the container's LayoutGroup.ItemStyle property. In this example, this style specifies the blue foreground color for labels
- for individual layout items - directly via their LayoutItem.LabelStyle properties. In the example, this style, applied to the first layout item (Model), paints the item's label in red.

The following image shows the result:

Is this topic helpful?​​​​​​​