locked
animation RRS feed

  • Question

  • i have a question obout animation.

    why i can't relized the tow kinds of animation at the same time?

     

    one is:
    
    public partial class Page : UserControl
        {
            private string[] photoArray = new stringDevil;
    
            public Page()
            {
                InitializeComponent();
                LoadImges();
            }
    
            private void InitialPicturePath()
            {
                photoArray[0] = "imgs/1.jpg";
                photoArray[1] = "imgs/2.jpg";
                photoArray[2] = "imgs/3.jpg";
                photoArray[3] = "imgs/4.jpg";
                photoArray[4] = "imgs/5.jpg";
                photoArray[5] = "imgs/6.jpg";
            }
    
            private void LoadImges()
            {
                InitialPicturePath();
                for (int i = 0; i <= photoArray.Length - 1; i++)
                {
                    if (!string.IsNullOrEmpty(photoArrayIdea))
                    {
                        string namestr1 = "borderimage" + (i + 1).ToString();
                        string namestr11 = namestr1 + (i + 1).ToString();
                        Border currentborder = (Border)this.FindName(namestr1);
                        currentborder.MouseEnter += new MouseEventHandler(currentborder_MouseEnter);
    
                    }
                }
            }
    
            void currentborder_MouseEnter(object sender, MouseEventArgs e)
            {
                int i = Convert.ToInt32((((Border)sender).Name).Substring(11));
                bigborderimge1.ImageSource = new BitmapImage(new Uri(photoArray[i - 1], UriKind.Relative));
                bigborderimge11.ImageSource = new BitmapImage(new Uri(photoArray[i - 1], UriKind.Relative));
                string j = "bigbordertext" + (((Border)sender).Name).Substring(11);
                bigbordertext1.Text = ((TextBlock)this.FindName(j)).Text;
            }
    
    
    the other is:
    
     private void aboutsws_MouseEnter(object sender, MouseEventArgs e)
            {
                aboutsws1.Begin();
                members1.Stop();
                publication1.Stop();
                teaching1.Stop();
                board1.Stop();
                research1.Stop();
            }
    
            private void members_MouseEnter(object sender, MouseEventArgs e)
            {
                members1.Begin();
                aboutsws1.Stop();
                publication1.Stop();
                teaching1.Stop();
                board1.Stop();
                research1.Stop();
            }
    
            private void research_MouseEnter(object sender, MouseEventArgs e)
            {
                research1.Begin();
                aboutsws1.Stop();
                members1.Stop();
                publication1.Stop();
                teaching1.Stop();
                board1.Stop();
            }
    
            private void publication_MouseEnter(object sender, MouseEventArgs e)
            {
                publication1.Begin();
                aboutsws1.Stop();
                members1.Stop();
                teaching1.Stop();
                board1.Stop();
                research1.Stop();
            }
     how i can relize the animations at the same time? please teach me! thanks.
    Sunday, December 7, 2008 9:35 PM

Answers

  • sorry! i had solved the problem.

    i had a little error in the source.

     

    Sunday, December 7, 2008 9:45 PM