首页 新闻 会员 周边

win8.1开发 控件旋转后 怎么让布局重新调整?

0
悬赏园豆:10 [已关闭问题] 关闭于 2014-04-14 15:27

我有一排的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();

 

txy0704的主页 txy0704 | 初学一级 | 园豆:89
提问于:2013-11-15 14:15
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册