Class Shape
Provides a base class for shape elements, such as Ellipse, Polygon, and Rectangle.
Inheritance
System.Object
Shape
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.dll
Syntax
public abstract class Shape : FrameworkElement
Constructors
|
Improve this Doc
View Source
Shape()
Provides base class initialization behavior for Shape derived classes.
Declaration
Fields
|
Improve this Doc
View Source
_canvasDomElement
Declaration
protected object _canvasDomElement
Field Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
_marginOffsets
Declaration
protected Point _marginOffsets
Field Value
|
Improve this Doc
View Source
FillProperty
Identifies the Fill dependency property.
Declaration
public static readonly DependencyProperty FillProperty
Field Value
|
Improve this Doc
View Source
StretchProperty
Identifies the Stretch dependency property.
Declaration
public static readonly DependencyProperty StretchProperty
Field Value
|
Improve this Doc
View Source
StrokeDashArrayProperty
Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
|
Improve this Doc
View Source
StrokeDashCapProperty
Declaration
[NotImplemented]
public static readonly DependencyProperty StrokeDashCapProperty
Field Value
|
Improve this Doc
View Source
StrokeDashOffsetProperty
Declaration
public static readonly DependencyProperty StrokeDashOffsetProperty
Field Value
|
Improve this Doc
View Source
StrokeEndLineCapProperty
Declaration
public static readonly DependencyProperty StrokeEndLineCapProperty
Field Value
|
Improve this Doc
View Source
StrokeLineJoinProperty
Declaration
public static readonly DependencyProperty StrokeLineJoinProperty
Field Value
|
Improve this Doc
View Source
StrokeMiterLimitProperty
Declaration
public static readonly DependencyProperty StrokeMiterLimitProperty
Field Value
|
Improve this Doc
View Source
StrokeProperty
Identifies the Stroke dependency property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
|
Improve this Doc
View Source
StrokeStartLineCapProperty
Declaration
public static readonly DependencyProperty StrokeStartLineCapProperty
Field Value
|
Improve this Doc
View Source
StrokeThicknessProperty
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
Properties
|
Improve this Doc
View Source
Fill
Gets or sets the Brush that specifies how to paint the interior of the shape.
Declaration
public Brush Fill { get; set; }
Property Value
|
Improve this Doc
View Source
Stretch
Gets or sets a Stretch enumeration value that describes how the shape fills
its allocated space.
Declaration
public Stretch Stretch { get; set; }
Property Value
|
Improve this Doc
View Source
Stroke
Gets or sets the Brush that specifies how the Shape outline is painted.
Declaration
public Brush Stroke { get; set; }
Property Value
|
Improve this Doc
View Source
StrokeDashArray
Gets or sets a collection of Double values that indicates the pattern of
dashes and gaps that is used to outline shapes.
Declaration
public DoubleCollection StrokeDashArray { get; set; }
Property Value
|
Improve this Doc
View Source
StrokeDashCap
Gets or sets a PenLineCap enumeration value that specifies how the ends of
a dash are drawn.
Declaration
[NotImplemented]
public PenLineCap StrokeDashCap { get; set; }
Property Value
Type |
Description |
PenLineCap |
One of the enumeration values for PenLineCap. The default is Flat.
|
|
Improve this Doc
View Source
StrokeDashOffset
Gets or sets a value that specifies the distance within the dash pattern
where a dash begins.
Declaration
public double StrokeDashOffset { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
StrokeEndLineCap
Gets or sets a PenLineCap enumeration value that describes the Shape at the
end of a line. The default is Flat.
Declaration
public PenLineCap StrokeEndLineCap { get; set; }
Property Value
|
Improve this Doc
View Source
StrokeLineJoin
Gets or sets a PenLineJoin enumeration value that specifies the type of join
that is used at the vertices of a Shape. The default value is Miter.
Declaration
public PenLineJoin StrokeLineJoin { get; set; }
Property Value
|
Improve this Doc
View Source
StrokeMiterLimit
Gets or sets a limit on the ratio of the miter length to half the StrokeThickness
of a Shape element. This value is always a positive number that is greater than
or equal to 1.
Declaration
public double StrokeMiterLimit { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
StrokeStartLineCap
Gets or sets a PenLineCap enumeration value that describes the Shape at the
start of a Stroke. The default is Flat.
Declaration
public PenLineCap StrokeStartLineCap { get; set; }
Property Value
|
Improve this Doc
View Source
StrokeThickness
Gets or sets the width of the Shape stroke outline.
Declaration
public double StrokeThickness { get; set; }
Property Value
Type |
Description |
System.Double |
|
Methods
|
Improve this Doc
View Source
ManageStrokeChanged()
Declaration
protected virtual void ManageStrokeChanged()
|
Improve this Doc
View Source
ManageStrokeThicknessChanged()
Declaration
protected virtual void ManageStrokeThicknessChanged()
|
Improve this Doc
View Source
MeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type |
Name |
Description |
Size |
availableSize |
|
Returns
Overrides
|
Improve this Doc
View Source
OnAfterApplyHorizontalAlignmentAndWidth()
Declaration
protected override void OnAfterApplyHorizontalAlignmentAndWidth()
Overrides
|
Improve this Doc
View Source
OnAfterApplyVerticalAlignmentAndWidth()
Declaration
protected override void OnAfterApplyVerticalAlignmentAndWidth()
Overrides
|
Improve this Doc
View Source
Redraw()
Declaration
protected virtual void Redraw()
|
Improve this Doc
View Source
Refresh()
method that end-users are supposed to call if they change the geometry and want to redraw the Path.
Declaration
|
Improve this Doc
View Source
Stretch_Changed(DependencyObject, DependencyPropertyChangedEventArgs)
Declaration
protected static void Stretch_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
Parameters
Extension Methods