示例#1
0
        public void ApplyIfSet_should_apply_proper_value()
        {
            var size = new Size(10, 20);

            size.ApplyIfSet(SizeUnit.NotSet, SizeUnit.Unlimited).ShouldBe(new Size(10, 20));
            size.ApplyIfSet(50, 3).ShouldBe(new Size(50, 3));
        }
示例#2
0
 public void Measure(Size size, IRendererContext context)
 {
     DesiredSize = OnMeasure(size.ApplyIfSet(Width, Height), context).ApplyIfSet(Width, Height);
 }