diff --git a/src/Perspex.SceneGraph/Media/TileBrush.cs b/src/Perspex.SceneGraph/Media/TileBrush.cs index 59160d70c0..da2958f6ec 100644 --- a/src/Perspex.SceneGraph/Media/TileBrush.cs +++ b/src/Perspex.SceneGraph/Media/TileBrush.cs @@ -6,6 +6,37 @@ namespace Perspex.Media { + /// + /// Describes how a is tiled. + /// + public enum TileMode + { + /// + /// A single repeat of the content will be displayed. + /// + None, + + /// + /// The content will be repeated horizontally, with alternate tiles mirrored. + /// + FlipX, + + /// + /// The content will be repeated vertically, with alternate tiles mirrored. + /// + FlipY, + + /// + /// The content will be repeated horizontally and vertically, with alternate tiles mirrored. + /// + FlipXY, + + /// + /// The content will be repeated. + /// + Tile + } + /// /// Base class for brushes which display repeating images. /// @@ -15,25 +46,25 @@ namespace Perspex.Media /// Defines the property. /// public static readonly PerspexProperty AlignmentXProperty = - PerspexProperty.Register("ALignmentX", AlignmentX.Center); + PerspexProperty.Register(nameof(AlignmentX), AlignmentX.Center); /// /// Defines the property. /// public static readonly PerspexProperty AlignmentYProperty = - PerspexProperty.Register("ALignmentY", AlignmentY.Center); + PerspexProperty.Register(nameof(AlignmentY), AlignmentY.Center); /// /// Defines the property. /// public static readonly PerspexProperty DestinationRectProperty = - PerspexProperty.Register("DestinationRect", RelativeRect.Fill); + PerspexProperty.Register(nameof(DestinationRect), RelativeRect.Fill); /// /// Defines the property. /// public static readonly PerspexProperty SourceRectProperty = - PerspexProperty.Register("SourceRect", RelativeRect.Fill); + PerspexProperty.Register(nameof(SourceRect), RelativeRect.Fill); /// /// Defines the property. @@ -41,6 +72,12 @@ namespace Perspex.Media public static readonly PerspexProperty StretchProperty = PerspexProperty.Register(nameof(Stretch), Stretch.Uniform); + /// + /// Defines the property. + /// + public static readonly PerspexProperty TileModeProperty = + PerspexProperty.Register(nameof(TileMode)); + /// /// Gets or sets the horizontal alignment of a tile in the destination. /// @@ -86,5 +123,14 @@ namespace Perspex.Media get { return (Stretch)this.GetValue(StretchProperty); } set { this.SetValue(StretchProperty, value); } } + + /// + /// Gets or sets the brush's tile mode. + /// + public TileMode TileMode + { + get { return (TileMode)this.GetValue(TileModeProperty); } + set { this.SetValue(TileModeProperty, value); } + } } }