Ergebnis 1 bis 2 von 2
-
Mich gibt's schon länger
- 22.11.2012, 09:12
- #1
hi leutz,
ich versuch grad eine DoubleAnimation zu coden ... klappt leider nur nich so ganz :/
es wird beiCode:sb.Begin();
In System.InvalidOperationException ist eine Ausnahme vom Typ "System.Windows.ni.dll" aufgetreten, doch wurde diese im Benutzercode nicht verarbeitet.
Code:if (Controller.GetController().CheckResult(Convert.ToInt32(resultBlock.Text))) resultInfoRect.Fill = new SolidColorBrush(Colors.Green); else resultInfoRect.Fill = new SolidColorBrush(Colors.Red); DoubleAnimation da = new DoubleAnimation(); da.AutoReverse = true; da.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); da.From = 0; da.To = 1; Storyboard sb = new Storyboard(); sb.Children.Add(da); Storyboard.SetTargetName(da, resultInfoRect.Name); Storyboard.SetTargetProperty(da, new PropertyPath(Rectangle.OpacityProperty)); sb.Begin();
eigentlich hab ich mich dabei an die msdn gehalten ...
weiss einer wo das problem is?
-
Mich gibt's schon länger
- 25.11.2012, 11:55
- #2
niemand eine idee?
edit: ich habe noch etwas herrausgefunden!
er schreibt noch
{System.InvalidOperationException: Cannot resolve TargetName resultInfoRect. at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.Storyboard_Begin(Storyboard storyboard) at System.Windows.Media.Animation.Storyboard.Begin() at MentalMathInstructor.CalculatePage.buttonE_Click(Object sender, RoutedEventArgs e)}
---------- Hinzugefügt um 12:55 ---------- Vorheriger Beitrag war um 11:20 ----------
Ok ich habs hinbekommen!
ich hab das Rectangle nun im Code selbst erstellt und nich wie vorher in xaml (bin mir aber nich sicher ob das auch nötig is)
und dann fehlte noch [csharp]LayoutRoot.Resources.Add("unique_id", sb);[/csharp]
in LayoutRoot befindet sich das zu animierende Rectangle
Ähnliche Themen
-
qr-code kalenderfunktion
Von lowtune2000 im Forum Windows Phone 7 AppsAntworten: 5Letzter Beitrag: 14.08.2013, 09:37 -
Code vergessen
Von kunne im Forum Apple iPhone 4/SAntworten: 13Letzter Beitrag: 27.10.2011, 22:01 -
QR-Code
Von srt6 im Forum Samsung Galaxy TabAntworten: 2Letzter Beitrag: 05.02.2011, 14:00 -
GSM Code
Von xdobiwan im Forum Touch HD CommunicationAntworten: 0Letzter Beitrag: 14.06.2010, 13:28 -
Code MEMO
Von Türk82 im Forum HTC Touch Diamond 2Antworten: 9Letzter Beitrag: 01.07.2009, 07:43
Pixel 10 Serie mit Problemen:...