我有一排的stackpanal控件横向排列,然后每列沿着Y轴经过不同的角度旋转后,怎么让控件并排着挨着一起,不留下任何空间?如下图所示,能不能让绿色部分连接在一起,而不是分开露出下面黑色的部分?
代码如下:
1 for (int i = 0; i < 10; i++) 2 { 3 StackPanel panel = new StackPanel(); 4 panel.Background = new SolidColorBrush(Colors.AliceBlue); 5 panel.Name = "panel" + i; 6 panel.Orientation = Orientation.Vertical; 7 panel.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center; 8 for (int j = 1; j < 4; j++) 9 { 10 Border bor = new Border(); 11 bor.Width = 100; 12 bor.Height = 140 + i * 3; 13 bor.Background =new SolidColorBrush(Colors.Green); 14 bor.Projection = ElementAnimation.RatationPlane(i * 4); 15 bor.UpdateLayout(); 16 panel.Children.Add(bor); 17 } 18 panel.Projection = ElementAnimation.RatationPlane(i * 4); 19 20 panel.UpdateLayout(); 21 scrollpanel.Children.Add(panel); 22 } 23 scrollpanel.UpdateLayout();