PrintControl.InvalidateBrick(Brick) Method
Redraws the specified brick in a document to apply any changes made to this brick.
Namespace: DevExpress.XtraPrinting.Control
Assembly: DevExpress.XtraPrinting.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
brick | Brick | A Brick object that needs to be redrawn. |
Example
This example illustrates how to change the background color of a brick after clicking it in Print Preview by handling the PrintControl.BrickClick event of PrintControl.
For the changes to take effect, call the PrintControl.InvalidateBrick
method to update the document area occupied by the brick.
Tip
A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E141.
using DevExpress.XtraPrinting.Control;
// ...
private void printControl1_BrickClick(object sender, BrickEventArgs e) {
if (e.Brick as VisualBrick != null) {
// Change the background color.
(e.Brick as VisualBrick).BackColor = Color.Red;
// Redraw the brick.
this.printControl1.InvalidateBrick(e.Brick);
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InvalidateBrick(Brick) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.