BackgroundFill Class
Provides a base class for an object that can be used as a background fill.
public abstract class BackgroundFill : ICloneable
- Inheritance:
- Object Object
- Implements:
- ICloneable
Constructors
BackgroundFill()
Initializes a new instance of the BackgroundFill
class.
protected BackgroundFill()
Remarks
The default constructor initializes all fields to their default values.
BackgroundFill(BackgroundFill)
Initializes a new instance of the BackgroundFill
class.
protected BackgroundFill(BackgroundFill copyFrom)
Parameter | Type | Description |
---|---|---|
copyFrom | BackgroundFill | An instance of |
Remarks
This constructor used in support of Clone() for base classes to initialize their fields.
Methods
Clone()
Creates an exact duplicate of the BackgroundFill object.
public abstract BackgroundFill Clone()
Returns
- BackgroundFill:
An exact duplicate of the BackgroundFill object.
Draw(Graphics, Rectangle)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
Draw(Graphics, Rectangle, Sides)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds, Sides side)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
side | Sides | The side with which the background fill should be oriented. |
Draw(Graphics, Rectangle, Rectangle)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds, Rectangle brushBounds)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
brushBounds | Rectangle | The reference bounds for the brush. |
Draw(Graphics, Rectangle, Rectangle, Sides)
Fills an area with the background fill.
public abstract void Draw(Graphics g, Rectangle bounds, Rectangle brushBounds, Sides side)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
brushBounds | Rectangle | The reference bounds for the brush. |
side | Sides | The side with which the background fill should be oriented. |
Equals(Object)
Determines whether the specified Object
is equal to the current Object
.
public override bool Equals(object obj)
Parameter | Type | Description |
---|---|---|
obj | Object | The |
Returns
- Boolean:
true
if the specifiedObject
is equal to the currentObject
; otherwise,false
.
GetBrush(Rectangle, Sides)
Gets a Brush that represents the background fill.
public virtual Brush GetBrush(Rectangle bounds, Sides side)
Parameter | Type | Description |
---|---|---|
bounds | Rectangle | The bounds of the area to paint. |
side | Sides | The side with which the background fill should be oriented. |
Returns
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
- Int32:
An integer value that specifies a hash value for this object.
OnPropertyChanged(EventArgs)
Raises the PropertyChanged
event.
protected virtual void OnPropertyChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
Events
PropertyChanged
Occurs after a property is changed.
Explicit Interface Implementations
ICloneable.Clone()
Creates a new object that is a copy of the current instance.