Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Summaries
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Collapse]Appearance and Conditional Formatting
    [Expand]Look and Feel
    [Expand]Appearances
    [Expand]Conditional Formats
    [Expand]Custom Painting
    [Collapse]Alpha Blending and Background Images
      Implement Alpha Blending Using Appearances
      Implement Alpha Blending Using Custom Painting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Implement Alpha Blending Using Custom Painting

You can enhance the appearance of your controls using alpha blending technology. This involves assigning a background image to a grid, and painting View elements using transparent pens and brushes. This topic describes how alpha blending can be implemented via custom painting.

Expanded Custom Painting and Alpha Blending

Grid Control provides multiple ways to customize the appearance and content of its elements. One of these ways is to paint View elements manually. For this purpose, the events designed specifically for this purpose that are listed in the Elements that can be Custom Painted document must be handled. Custom draw events provide a number of parameters that can be used to obtain the painting surface, the element's bounding rectangle, its appearance settings, etc. Each custom painting event has a Handled parameter that specifies whether the default painting should be performed or not. These events can be handled to implement the alpha blending feature.

Expanded Custom Painting the View Footer - A Sample

The following sample code handles the GridView.CustomDrawFooter event to custom paint a View's footer. It fills the footer's background with transparent brushes and then draws the 'The Grid Control Suite' string. The image below shows the result (it is assumed that a background image has already been assigned to the grid).

Expanded See Also

How would you rate this topic?​​​​​​​