Browse Source

Nullable attributes

pull/11073/head
Max Katz 4 years ago
parent
commit
c2b2803483
  1. 6
      src/Avalonia.Controls/Shapes/Polygon.cs
  2. 6
      src/Avalonia.Controls/Shapes/Polyline.cs

6
src/Avalonia.Controls/Shapes/Polygon.cs

@ -4,15 +4,15 @@ namespace Avalonia.Controls.Shapes
{
public class Polygon : Shape
{
public static readonly StyledProperty<Points> PointsProperty =
AvaloniaProperty.Register<Polygon, Points>("Points");
public static readonly StyledProperty<Points?> PointsProperty =
AvaloniaProperty.Register<Polygon, Points?>("Points");
static Polygon()
{
AffectsGeometry<Polygon>(PointsProperty);
}
public Points Points
public Points? Points
{
get { return GetValue(PointsProperty); }
set { SetValue(PointsProperty, value); }

6
src/Avalonia.Controls/Shapes/Polyline.cs

@ -5,8 +5,8 @@ namespace Avalonia.Controls.Shapes
{
public class Polyline: Shape
{
public static readonly StyledProperty<Points> PointsProperty =
AvaloniaProperty.Register<Polyline, Points>("Points");
public static readonly StyledProperty<Points?> PointsProperty =
AvaloniaProperty.Register<Polyline, Points?>("Points");
static Polyline()
{
@ -14,7 +14,7 @@ namespace Avalonia.Controls.Shapes
AffectsGeometry<Polyline>(PointsProperty);
}
public Points Points
public Points? Points
{
get { return GetValue(PointsProperty); }
set { SetValue(PointsProperty, value); }

Loading…
Cancel
Save