feat: demo page.

This commit is contained in:
Zhang Dian
2023-09-18 13:12:28 +08:00
parent ef4d871bcf
commit 2d15767f00
2 changed files with 645 additions and 7 deletions

View File

@@ -12,9 +12,9 @@ public class ElasticWrapPanel : WrapPanel
static ElasticWrapPanel()
{
IsFillHorizontalProperty.Changed.AddClassHandler<Control>(OnIsFillPropertyChanged);
IsFillHorizontalProperty.Changed.AddClassHandler<Control>(OnIsFillPropertyChanged);
IsFillVerticalProperty.Changed.AddClassHandler<Control>(OnIsFillPropertyChanged);
AffectsMeasure<ElasticWrapPanel>(IsFillHorizontalProperty, IsFillHorizontalProperty);
AffectsMeasure<ElasticWrapPanel>(IsFillHorizontalProperty, IsFillVerticalProperty);
}
#region AttachedProperty
@@ -95,7 +95,7 @@ public class ElasticWrapPanel : WrapPanel
childFixConstraint = new Size(constraint.Width, itemHeight);
break;
case Orientation.Vertical when itemWidthSet:
childFixConstraint = new Size(itemWidth, itemHeight);
childFixConstraint = new Size(itemWidth, constraint.Height);
break;
}