diff --git a/TestApplication/Program.cs b/TestApplication/Program.cs index 10eadb414d..297e244473 100644 --- a/TestApplication/Program.cs +++ b/TestApplication/Program.cs @@ -465,7 +465,7 @@ namespace TestApplication private static TabItem AnimationsTab() { Border border1; - Rectangle rect2; + Border border2; RotateTransform rotate; Button button1; @@ -494,19 +494,27 @@ namespace TestApplication VerticalAlignment = VerticalAlignment.Center, Background = Brushes.Crimson, RenderTransform = new RotateTransform(), - Content = new Border + Content = new TextBox { - Background = Brushes.Gainsboro, - Margin = new Thickness(25), - } + Background = Brushes.White, + Text = "Hello!", + HorizontalAlignment = HorizontalAlignment.Center, + VerticalAlignment = VerticalAlignment.Center, + }, }), - (rect2 = new Rectangle + (border2 = new Border { Width = 100, Height = 100, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, - Fill = Brushes.Coral, + Background = Brushes.Coral, + Content = new Image + { + Source = new Bitmap("github_icon.png"), + HorizontalAlignment = HorizontalAlignment.Center, + VerticalAlignment = VerticalAlignment.Center, + }, RenderTransform = (rotate = new RotateTransform { PropertyTransitions = new PropertyTransitions @@ -534,14 +542,14 @@ namespace TestApplication button1.Click += (s, e) => { - if (rect2.Width == 100) + if (border2.Width == 100) { - rect2.Width = rect2.Height = 400; + border2.Width = border2.Height = 400; rotate.Angle = 180; } else { - rect2.Width = rect2.Height = 100; + border2.Width = border2.Height = 100; rotate.Angle = 0; } }; diff --git a/Windows/Perspex.Direct2D1/Renderer.cs b/Windows/Perspex.Direct2D1/Renderer.cs index d36bcd2ade..f6240e934f 100644 --- a/Windows/Perspex.Direct2D1/Renderer.cs +++ b/Windows/Perspex.Direct2D1/Renderer.cs @@ -134,7 +134,7 @@ namespace Perspex.Direct2D1 { if (visual.IsVisible && visual.Opacity > 0) { - // Translate an existing transform into this controls coordinate system. + // Translate any existing transform into this controls coordinate system. Matrix offset = Matrix.Translation(visual.Bounds.Position); transform = offset * transform * -offset;