PrintControl.InvalidateBrick(Brick) Method
In This Article
Redraws the specified brick in a document to apply any changes made to this brick.
Namespace: DevExpress.XtraPrinting.Control
Assembly: DevExpress.XtraPrinting.v24.2.dll
NuGet Package: DevExpress.Win.Printing
#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.
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);
}
}
See Also