public void Out_Of_Bounds_Control_Should_Not_Be_Rendered() { TestControl target; var container = new Canvas { Width = 100, Height = 100, ClipToBounds = true, Children = new Controls.Controls { (target = new TestControl { Width = 10, Height = 10, ClipToBounds = true, [Canvas.LeftProperty] = 110, [Canvas.TopProperty] = 110, }) } }; Render(container); Assert.False(target.Rendered); }
public void Negative_Margin_Should_Be_Respected() { TestControl target; var container = new Canvas { Width = 100, Height = 100, ClipToBounds = true, Children = new Controls.Controls { new Border { Margin = new Thickness(100, 100, 0, 0), Child = target = new TestControl { Width = 10, Height = 10, Margin = new Thickness(-100, -100, 0, 0), } } } }; Render(container); Assert.True(target.Rendered); }
public void RenderTransform_Should_Be_Respected() { TestControl target; var container = new Canvas { Width = 100, Height = 100, ClipToBounds = true, Children = new Controls.Controls { (target = new TestControl { Width = 10, Height = 10, [Canvas.LeftProperty] = 110, [Canvas.TopProperty] = 110, RenderTransform = new TranslateTransform(-100, -100), }) } }; Render(container); Assert.True(target.Rendered); }