ExpanderItem
Represents an expander that is drawn in expander cells
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ExpanderItem : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementExpanderItem...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the ExpanderItem class.
public ExpanderItem()
Fields
The cached bitmap used to paint SignImage, scaled for the current DPI settings.
protected Image cachedSignImage
Identifies whether the sign's outline is painted.
public static readonly RadProperty DrawSignBorderProperty
Identifies whether the sign's background fill is painted.
public static readonly RadProperty DrawSignFillProperty
This event fires when the expanded state is changed.
public static RoutedEvent ExpandedChangedEvent
Identifies whether the sign is expanded; changing it also raises ExpandedChangedEvent.
public static RadProperty ExpandedProperty
Identifies the color used for connector lines around the sign.
public static RadProperty LinkLineColorProperty
Identifies the dash pattern used for connector lines around the sign.
public static RadProperty LinkLineStyleProperty
Identifies the stroke width used for connector lines around the sign.
public static RadProperty LinkLineWidthProperty
Identifies which connector segments are drawn around the sign.
public static RadProperty LinkOrientationProperty
Identifies the second color used to fill the sign.
public static RadProperty SignBackColor2Property
Identifies the third color used to fill the sign.
public static RadProperty SignBackColor3Property
Identifies the fourth color used to fill the sign.
public static RadProperty SignBackColor4Property
Identifies the first color used to fill the sign.
public static RadProperty SignBackColorProperty
Identifies the outline color used for the sign.
public static RadProperty SignBorderColorProperty
public static readonly RadProperty SignBorderPaddingProperty
Identifies the outline width around the sign.
public static readonly RadProperty SignBorderWidthProperty
Identifies the angle used by linear sign-fill gradients.
public static RadProperty SignGradientAngleProperty
Identifies the gradient offset of the fourth sign fill color.
public static RadProperty SignGradientPercentage2Property
Identifies the gradient offset of the third sign fill color.
public static RadProperty SignGradientPercentageProperty
Identifies the fill style used to render the sign's background colors.
public static RadProperty SignGradientStyleProperty
Identifies the source image used when the sign style is Image.
public static RadProperty SignImageProperty
Identifies how many sign fill colors participate in rendering; the renderer uses at most four.
public static RadProperty SignNumberOfColorsProperty
Identifies the inset between the sign border and a vector sign glyph.
public static readonly RadProperty SignPaddingProperty
Identifies the configured size for vector signs and the fallback size when an image sign has no cached image.
public static RadProperty SignSizeProperty
Identifies whether the sign is drawn as a plus/minus, arrow, image, or triangle.
public static RadProperty SignStyleProperty
Identifies the stroke width used to draw vector sign shapes.
public static readonly RadProperty SignWidthProperty
Identifies whether sign painting uses equal width and height based on the smaller configured sign dimension.
public static RadProperty SquareSignSizeProperty
Properties
Gets or sets a value indicating that the sign's border must be drawn
public bool DrawSignBorder { get; set; }
Gets or sets a value indicating that the sign's fill must be drawn
public bool DrawSignFill { get; set; }
Gets or sets a value indicating whether the sign is in expanded or collapsed state
public virtual bool Expanded { get; set; }
Gets or sets a value determining the color of the link lines
public Color LinkLineColor { get; set; }
Gets or sets a value determining the style of the link lines
public DashStyle LinkLineStyle { get; set; }
Gets or sets a value determining the width of the link lines
public float LinkLineWidth { get; set; }
Gets or sets a value detemining the link lines that be rendered around the expander sign
public ExpanderItem.LinkLineOrientation LinkOrientation { get; set; }
Gets or sets sign's back color
public virtual Color SignBackColor { get; set; }
Gets or sets sign's second back color
public virtual Color SignBackColor2 { get; set; }
Gets or sets sign's third back color
public virtual Color SignBackColor3 { get; set; }
Gets or sets sign's fourth back color
public virtual Color SignBackColor4 { get; set; }
Gets or sets the sign's border color
public virtual Color SignBorderColor { get; set; }
Gets or sets the padding sizes of the border around the sign.
public Padding SignBorderPadding { get; set; }
Gets or sets the border width of the sign.
public float SignBorderWidth { get; set; }
Gets or sets the gradient angle of sign's background
public virtual float SignGradientAngle { get; set; }
Gets or sets the gradient percentage of sign's background
public virtual float SignGradientPercentage { get; set; }
Gets or sets the second gradient percentage of sign's background
public virtual float SignGradientPercentage2 { get; set; }
Gets or sets the gradient style of sign's background
public virtual GradientStyles SignGradientStyle { get; set; }
Gets or sets the sign image.
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image SignImage { get; set; }
Gets or sets the number of colors used for drawing sign's background
public virtual int SignNumberOfColors { get; set; }
Gets or sets the padding sizes of the sign.
public Padding SignPadding { get; set; }
Gets or sets the sign's style
public virtual SignStyles SignStyle { get; set; }
Gets or sets a value indicating that the sign must maintain square size
public virtual bool SquareSignSize { get; set; }
Methods
Releases the cached sign bitmap when the expander is disposed.
protected override void DisposeManagedResources()
Overrides:
Recreates the cached sign bitmap after the element's DPI scale changes.
public override void DpiScaleChanged(SizeF scaleFactor)
The new DPI scale factor.
Overrides:
Enables mouse handling and painting while keeping the expander content-sized horizontally and stretchable vertically.
protected override void InitializeFields()
Overrides:
Allows changes to this element's properties to be canceled during property update processing.
protected override bool IsPropertyCancelable(RadPropertyMetadata metadata)
The metadata associated with the property change.
Returns:true for every property.
Overrides:
Measures from the cached image size for an image sign, or from SignSize otherwise, then adds the element's padding.
Toggles the expanded state when the left mouse button is released over the expander.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Rebuilds the cached sign image when SignImage changes and raises the bubbled expanded event when Expanded changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Details of the changed property and its new value.
Overrides:
Paint the sign's border
protected virtual void PaintBorder(IGraphics g, RectangleF signBorder)
The IGraphics to use for painting the sign's border
signBorderRectangleFRectangle containing sign bounds
Paints the sign background, outline, glyph or image, and any configured connector lines.
Paints the sign
protected virtual void PaintSign(IGraphics g, RectangleF signRect)
The IGraphics to use fo painting the sign
signRectRectangleFRectangle containing sign bounds
Draws the connector segments selected by LinkOrientation around the sign, placing the horizontal segment according to right-to-left layout.
protected virtual void PaintSignLines(IGraphics g, RectangleF signRect, RectangleF signBorder)
The graphics context used for painting.
signRectRectangleFThe bounds of the sign glyph or image.
signBorderRectangleFThe bounds of the sign border.
protected void PaintSignShape(IGraphics g, RectangleF signRect)
The graphics context used for painting.
signRectRectangleFThe bounds available for the sign shape.
Creates the cached sign bitmap from the supplied image, scaling it when both global and image DPI scaling are enabled.
protected virtual void UpdateSignImage(Image newImage)
The source image to cache.