- Projektor topic
- AMD Radeon™ RX 470 / 480 és RX 570 / 580 / 590
- Azonnali alaplapos kérdések órája
- Autós kamerák
- Gaming notebook topik
- OLED TV topic
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- Lopakodva befutott a Radeon RX 9060
- AMD Navi Radeon™ RX 9xxx sorozat
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
Új hozzászólás Aktív témák
-
cigam
titán
válasz
ferensz #6499 üzenetére
Értem. Ez ugye nem fizetős? Akkor miért kell hozzá egy plusz "fejlesztői" licence? Ezzel mit vállalok magamra?
Karma
Köszi, de ehhez én kevés vagyok. Egy árva bötüt nem értek az egészből, pedig jópár oldalt átnyálaztam.
Ez pl. egy komplett kódnak tűbik, de még lefordítani sem tudom.
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace AnimationCompletedTest {
public partial class MainWindow : Window {
Canvas panel;
public MainWindow() {
InitializeComponent();
MouseDown += DoDynamicAnimation;
Content = panel = new Canvas();
}
void DoDynamicAnimation(object sender, MouseButtonEventArgs args) {
for (int i = 0; i < 12; ++i) {
var e = new Ellipse { Width = 16, Height = 16, Fill = SystemColors.HighlightBrush };
Canvas.SetLeft(e, Mouse.GetPosition(this).X);
Canvas.SetTop(e, Mouse.GetPosition(this).Y);
var tg = new TransformGroup();
var translation = new TranslateTransform(30, 0);
var translationName = "myTranslation" + translation.GetHashCode();
RegisterName(translationName, translation);
tg.Children.Add(translation);
tg.Children.Add(new RotateTransform(i * 30));
e.RenderTransform = tg;
panel.Children.Add(e);
var anim = new DoubleAnimation(3, 100, new Duration(new TimeSpan(0, 0, 0, 1, 0))) {
EasingFunction = new PowerEase { EasingMode = EasingMode.EaseOut }
};
var s = new Storyboard();
Storyboard.SetTargetName(s, translationName);
Storyboard.SetTargetProperty(s, new PropertyPath(TranslateTransform.YProperty));
var storyboardName = "s" + s.GetHashCode();
Resources.Add(storyboardName, s);
s.Children.Add(anim);
s.Completed +=
(sndr, evtArgs) => {
panel.Children.Remove(e);
Resources.Remove(storyboardName);
UnregisterName(translationName);
};
s.Begin();
}
}
[STAThread]
public static void Main() {
var app = new Application();
app.Run(new MainWindow());
}
}
}
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- 129 - Lenovo Legion Pro 7 (16ARX8H) - AMD Ryzen 9 7945HX, RTX 4080
- Bowers/Wilkins PX8 fejhallgatók (dupla Bluetooth eszköz csatlakoztatása!)
- Xbox Ultimate előfizetések
- Gamer Notebook! Lenovo Ideapad Gaming3! I7 10750H / GTX 1650Ti / 8GB DDR4 / 256GB SSD
- BESZÁMÍTÁS! Logitech G923 Driving Force Racing Wheel + Shifter garanciával hibátlan működéssel
Állásajánlatok
Cég: FOTC
Város: Budapest