就是有两个border,初始状态下里面是空的,然后通过按钮动态互相交换,先定义了两个用户控件分别是显示红色和灰色的Grid,
我的代码是这样的,
 public MainPage()
        {  
            InitializeComponent();
            ap= (App)App.Current;
            firstBorder.Child = ap.panel[1];
            secondBorder.Child = ap.panel[2];
            
        }
 private void btnSecond_Click(object sender, RoutedEventArgs e)
        {            
            firstBorder.Child = null;
            secondBorder.Child = null;        
            //交换键值
            ap.panel[7] = ap.panel[1];
            ap.panel[1] = ap.panel[2];
            ap.panel[2] = ap.panel[7];            
            firstBorder.Child = ap.panel[1];
            secondBorder.Child = ap.panel[2];
        }
这个ap是一个字典,
是这样定义的,就是一个数字做为键,用户控件做为值,然后键为7的项做为临时交换用,默认为空值
现在的交换是没有动画的,我想实现就是交换的过程产生一个动画的效果,请问具体应该怎么做?
给豆豆我