[]
        
(Showing Draft Content)

FarPoint.Win.ElementWindowless

ElementWindowless Class

Represents the windowless element for a control.

Inheritance
ElementWindowless
Implements
Namespace: FarPoint.Win
Assembly: FarPoint.Win.dll
Syntax
public class ElementWindowless : ISerializeSupport
Public Class ElementWindowless
    Implements ISerializeSupport

Constructors

Name Description
ElementWindowless()

Creates a new windowless element object.

ElementWindowless(object)

Creates a new windowless element object based on the specified object.

Fields

Name Description
BACK_COLOR_DEFAULT

Represents the default color background for the element, namely SystemColors.Control.

DYNAMICNAME

Represents the default name for shape, the name will be correct when the shape is added to the collection.

FORE_COLOR_DEFAULT

Represents the default text color for the element, namely SystemColors.ControlText.

PICTURE_MARGIN_DEFAULT

Represents the default picture margin for the element, namely 2 pixels.

Properties

Name Description
AlignHorz

Gets or sets the horizontal alignment of the contents of the element.

AlignText

Gets or sets the text alignment for the element.

AlignVert

Gets or sets the vertical alignment of the contents of the element.

BackColor

Gets or sets the background color for the element.

BackgroundImage

Gets or sets the background image for the control.

Border

Gets or sets the border for the element.

CanFocus

Gets or sets whether the element can receive focus.

CancelMouse

Internal use only.

ContainsFocus

Gets whether the element currently has the input focus.

DrawFocusRectangle

Gets or sets the focus rectangle drawing style in the element.

Elements

Gets the collection of IElement-derived objects that the current ElementWindowless object contains.

Enabled

Gets or sets whether the element is enabled.

Focused

Gets whether the element has focus.

Font

Gets or sets the font for the element.

ForeColor

Gets or sets the foreground color for the element.

ForegroundImage

Gets or sets the foreground image for the element.

MarginBottom

Gets or sets the margin between the bottom of the element and its contents.

MarginLeft

Gets or sets the margin between the left edge of the element and its contents.

MarginRight

Gets or sets the margin between the right edge of the element and its contents.

MarginTop

Gets or sets the margin between the top of the element and its contents.

Name

Gets or sets the name of the element.

Parent

Internal use only.

Picture

Gets or sets the picture for the element.

PictureMargin

Gets or sets the margin between the text and the picture.

PictureOrientation

Gets or sets the picture orientation for the element.

PictureTransparencyColor

Gets or sets the picture transparency color for the element.

PictureTransparencyTolerance

Gets or sets the picture transparency tolerance for the element.

Rectangle

Gets the rectangular coordinates of the element.

RectangleF

Gets the rectangular coordinates of the element.

Redraw

Gets or sets whether the element is allowed to paint.

ScaleFactor
Selectable

Gets or sets whether the control can receive focus.

State

Gets or sets the state of the element.

StateNotifyList

Internal use only.

Tag

Gets or sets the Tag object for the element.

Text

Gets or sets the text for the element.

TextOrientation

Gets or sets the text orientation for the element.

TextRotationAngle

Gets or sets the rotation angle of the text in the element.

TextWrap

Gets or sets whether to wrap the text in the element.

Visible

Gets or sets whether the element is visible.

Methods

Name Description
CopyTo(object)

Copies the properties of this windowless element object into the target object.

Deserialize(XmlNodeReader)

Loads the object from XML.

DrawRotatedText(Graphics, string, Font, Color, Rectangle, HorizontalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int)

Draws the specified string in the specified rectangle, with the specified font, color, alignments, orientation, hotkey prefix, and wrapping.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, and string trimming.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming, int, bool, double, bool)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, string trimming, and rotation angle.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming, int, bool, double, int, bool)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, string trimming, and rotation angle.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming, int, bool, float)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, string trimming, and rotation angle.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, and string trimming.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int, bool)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, and string trimming.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int, bool, double, bool)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, string trimming, and rotation angle.

DrawRotatedText(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, HotkeyPrefix, StringTrimming, int, bool, float)

Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, and string trimming.

Focus(bool)

Moves the focus to the element.

GetClientRectangle()

Gets the coordinates of the element.

GetClientRectangle(Rectangle)

Gets the coordinates of the element.

GetClientRectangleF()

Gets the coordinates of the element.

GetClientRectangleF(RectangleF)

Gets the coordinates of the element.

GetControl()

Gets the Control object if the element is derived from the ElementWindowless class.

GetElementStyle()

Gets the style for the element.

GetFont()

Gets the default font used by the element, if the Font property is null.

GetRotatedTextSize(Graphics, string, Font, Rectangle, TextOrientation, bool, HotkeyPrefix, StringTrimming)

Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.

GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming)

Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.

GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, HotkeyPrefix, StringTrimming)

Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.

GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, HotkeyPrefix, StringTrimming, double)

Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.

GetTextAndPictureRectangles(Graphics, Rectangle, ref Rectangle, ref Rectangle)

Gets the rectangles for the text and pictures of the element.

OnBackgroundImageChanged(object, EventArgs)

Raises the BackgroundImageChanged event when the background picture has changed.

OnChanged(object, EventArgs)

Raises the Changed event when the element has changed.

OnClick(EventArgs)

Raises the Click event when the use clicks on the control.

OnDoubleClick(EventArgs)

Raises the DoubleClick event when the use double-clicks on the control.

OnFontChanged(EventArgs)

Raises the FontChanged event when the font in the control has changed.

OnForegroundImageChanged(object, EventArgs)

Raises the ForegroundImageChanged event when the foreground picture has changed.

OnMouseDown(MouseEventArgs)

Raises the MouseDown event when the pointer button is pressed while the cursor is over the control.

OnMouseMove(MouseEventArgs)

Raises the MouseMove event when the pointer is moved within the control and the cursor is over the control.

OnMouseUp(MouseEventArgs)

Raises the MouseUp event when the pointer button is released while the cursor is over the control.

OnNameChanging(object, NameChangingEventArgs)

Raises the NameChanging event.

OnPaint(Graphics, Rectangle)

Paints the element (text and picture).

OnPaint(Graphics, Rectangle, ElementStyle)

Paints the element (both text and picture) using an overriding style.

OnPaintBackground(Graphics, Rectangle)

Paints the background of the element.

OnPaintBackground(Graphics, Rectangle, ElementStyle)

Paints the background of the element using an overriding style.

OnParentChanged(EventArgs)

Raises the ParentChanged event when the the parent of the element has changed.

OnPictureChanged(object, EventArgs)

Raises the PictureChanged event when the picture has changed.

OnPropertyChanged(object, PropertyChangedEventArgs)

Raises the PropertyChanged event when the property on an element has changed.

PaintBackColor(Graphics, Rectangle)

Paints background color.

PaintBackgroundImage(Graphics, Rectangle)

Paints background image.

PaintBorder(Graphics, Rectangle)

Paints borders.

PaintElements(Graphics, Rectangle)

Paints elements.

PaintFocusRectangle(Graphics, Rectangle)

Paints focus rectangle.

PaintForegroundImage(Graphics, Rectangle)

Paints foreground image.

PaintPicture(Graphics, Rectangle)

Paints the picture in the element.

PaintSpecialBackground(Graphics, Rectangle)

Paints special background.

PaintSpecialForeground(Graphics, Rectangle)

Paints special foreground.

PaintText(Graphics, Rectangle)

Paints the text of the element in the specified rectangle.

PaintTextAndPicture(Graphics, Rectangle)

Paints the text and picture in the element.

ProcessMouseDown(MouseEventArgs)

MouseDown processing.

ProcessMouseUp(MouseEventArgs)

MouseDown processing.

Refresh()

Forces the element to invalidate its client area and immediately repaint.

ResetAlignHorz()

Resets the horizontal alignment of the element to the default value.

ResetAlignText()

Resets the text alignment of the element to the default value.

ResetAlignVert()

Resets the vertical alignment of the element to the default value.

ResetBackColor()

Resets the background color to its default setting.

ResetBackgroundImage()

Resets the background image of the element to the default value.

ResetBorder()

Resets the border of the element to its default settings.

ResetCanFocus()

Resets to the default value whether the element can have the focus.

ResetElements()

Resets the elements to their default settings.

ResetEnabled()

Resets to the default value whether the element is enabled.

ResetFont()

Resets the font for the element to it default value.

ResetForeColor()

Resets the text color for the element to its default value.

ResetForegroundImage()

Resets the foreground image for the element to its default value.

ResetMarginBottom()

Resets the margin between the bottom of the element and its contents to the default value.

ResetMarginLeft()

Resets the margin between the left side of the element and its contents to the default value.

ResetMarginRight()

Resets the margin between the right side of the element and its contents to the default value.

ResetMarginTop()

Resets the margin between the top of the element and its contents to the default value.

ResetParent()

Internal use only.

ResetPicture()

Resets the image for the element to its default value.

ResetPictureMargin()

Resets the margin between text and picture to its default value.

ResetPictureOrientation()

Resets the orientation of the picture in the element to its default value.

ResetPictureTransparencyColor()

Resets the transparency of a picture in the element to its default value.

ResetPictureTransparencyTolerance()

Resets the transparency tolerance for a picture in the element to its default value.

ResetTag()

Resets the Tag object for the element to its default value.

ResetText()

Resets the text in an element to its default value.

ResetTextOrientation()

Resets the orientation of text in an element to its default value.

ResetTextRotationAngle()

Resets the rotation angle for text in the element to its default value.

ResetVisible()

Resets to the default value whether an element is visible.

Serialize(XmlTextWriter)

Saves the object to XML.

SetBounds(Rectangle)

Sets the bounds of the element to the location and size of the specified bounding rectangle object (with integer values).

SetBounds(RectangleF)

Sets the bounds of the element to the location and size of the specified bounding rectangle object (with floating-point values).

SetBounds(int, int, int, int)

Sets the bounds of the element to the location and size of the bounding rectangle of the specified dimensions (in integer values).

SetBoundsFloat(float, float, float, float)

Sets the bounds of the element to the location and size of the bounding rectangle of the specified dimensions (in floating-point values).

SetElementStyle(ElementStyle)

Sets the style for the element.

SetElementStyle(ElementStyle, bool)

Sets the style for the element and clears unset properties.

SetState(ElementState)

Sets the state of the element.

ShouldSerializeBackColor()

Indicates whether the BackColor property should be persisted.

ShouldSerializeFont()

Indicates whether the Font property should be persisted.

ShouldSerializeForeColor()

Indicates whether the ForeColor property should be persisted.

ShouldSerializePictureTransparencyColor()

Indicates whether the PictureTransparencyColor property should be persisted.

ShouldSerializePictureTransparencyTolerance()

Indicates whether the PictureTransparencyTolerance property should be persisted.

ShouldSerializeTag()

Indicates whether the Tag property should be persisted.

ShouldSerializeTextRotationAngle()

Indicates whether the TextRotationAngle property should be persisted.

ToGrayscale(Color)
ToGrayscale(Image)
ToggleState()

Toggles the state of the element.

Update()

Causes the control to redraw the invalidated regions with its client area.

Events

Name Description
BackgroundImageChanged

Occurs when the background image for the element changes.

Changed

Occurs when the element changes.

Click

Occurs when the user clicks the element.

DoubleClick

Occurs when the user double-clicks the element.

FontChanged

Occurs when the font for the element changes.

ForegroundImageChanged

Occurs when the foreground image for the element changes.

MouseDown

Occurs if the user presses a mouse button while the cursor is over the element.

MouseMove

Occurs if the user moves the cursor while the cursor is over the element.

MouseUp

Occurs if the user releases a mouse button while the cursor is over the element.

NameChanging

Occurs before the Name property of the element changes.

ParentChanged

Occurs when the parent of the element changes.

PictureChanged

Occurs when the picture in the element changes.

PropertyChanged

Occurs when a property on the element changes.