Autor Beitrag
tomo2403
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

Win10
C#, VS 2019
BeitragVerfasst: So 16.02.20 18:49 
:wave:

Im XAML-Code meiner WPF-Anwendung habe ich eine Animation mit Blend erstellt die immer ausgeführt wird, wenn man einen bestimmten Button anklickt.
Ich würde die Animation aber auch gerne über den C#-Code ausführen. Bis jetzt habe ich nur das gefunden:
ausblenden C#-Quelltext
1:
StoryboardName.Storyboard.Begin();					

Da passiert bei mir aber garnichts. Gibt es noch einen anderen Befehl?

VG Tom


Zuletzt bearbeitet von tomo2403 am Mo 17.02.20 10:47, insgesamt 1-mal bearbeitet
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 17.02.20 10:44 
Du meinst Begin (mit einem 'n')?

Hat die Animation einen TargetName?
Ansonsten mußt du das Element bei einer der überladenen Begin-Methoden angeben.
tomo2403 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

Win10
C#, VS 2019
BeitragVerfasst: Di 18.02.20 11:38 
Ah, ich hatte den TargetName vergessen.
Danke!