Browse Source

Added DesiredSize as a readonly PP.

Steven Kirk 10 years ago
parent
commit
928e159aba
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/Perspex.Layout/Layoutable.cs

+ 7 - 1
src/Perspex.Layout/Layoutable.cs

@@ -66,6 +66,12 @@ namespace Perspex.Layout
     /// </summary>
     public class Layoutable : Visual, ILayoutable
     {
+        /// <summary>
+        /// Defines the <see cref="DesiredSize"/> property.
+        /// </summary>
+        public static readonly PerspexProperty<Size> DesiredSizeProperty =
+            PerspexProperty.RegisterDirect<Layoutable, Size>(nameof(DesiredSize), o => o.DesiredSize);
+
         /// <summary>
         /// Defines the <see cref="Width"/> property.
         /// </summary>
@@ -249,7 +255,7 @@ namespace Perspex.Layout
         public Size DesiredSize
         {
             get;
-            set;
+            private set;
         }
 
         /// <summary>