Bir nechta xususiyatlarni animatsiya qilish




Download 187,23 Kb.
Pdf ko'rish
bet4/4
Sana02.02.2024
Hajmi187,23 Kb.
#150757
1   2   3   4
Bog'liq
7. Animatsiyalar

Bir nechta xususiyatlarni animatsiya qilish
Bitta animatsiya faqat bitta obyekt xususiyati bilan ishlashi mumkin. Ammo, agar biz bir vaqtning
o'zida bir nechta xususiyatni jonlantirishimiz kerak bo'lsa, biz har biri uchun o'z animatsiya
ob'ektimizni o'rnatishimiz mumkin:
 
 
 
 
 
 
 
 
 
 
15
16
MessageBox.Show(
"Анимация завершена"
);
}
1
2
3
4
5
6
7
8
9
10
o'n bir
12
13
14
// анимация для ширины
DoubleAnimation widthAnimation = 
new
DoubleAnimation();
widthAnimation.From = helloButton.ActualWidth;
widthAnimation.To = 150;
widthAnimation.Duration = TimeSpan.FromSeconds(5);
// анимация для высоты
DoubleAnimation heightAnimation = 
new
DoubleAnimation();
heightAnimation.From = helloButton.ActualHeight;
heightAnimation.To = 60;
heightAnimation.Duration = TimeSpan.FromSeconds(5);
helloButton.BeginAnimation(Button.WidthProperty, widthAnimation);
helloButton.BeginAnimation(Button.HeightProperty, heightAnimation);

Download 187,23 Kb.
1   2   3   4




Download 187,23 Kb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



Bir nechta xususiyatlarni animatsiya qilish

Download 187,23 Kb.
Pdf ko'rish