Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 03-04-2008, 08:46 AM XAML and Javascript
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
well I've created something in Expression Blend and both the XAML and javascript work fine, but then I add it dynamically using .net and I get an error with saying basically that it can't begin() the storyboard. Here is what the dynamic XAML looks like:

Code:
StringBuilder sb = new StringBuilder();

            sb.Append(@"<Storyboard x:Name=""SB" + xamlObjectName + @"_Enter"">
			                <DoubleAnimationUsingKeyFrames BeginTime=""00:00:00"" Storyboard.TargetName=""" + xamlObjectName + @"_SubRect"" Storyboard.TargetProperty=""(FrameworkElement.Height)"">
				                <SplineDoubleKeyFrame KeyTime=""00:00:00"" Value=""22""/>
				                <SplineDoubleKeyFrame KeyTime=""00:00:00.2000000"" Value=""30""/>
			                </DoubleAnimationUsingKeyFrames>
			                <DoubleAnimationUsingKeyFrames BeginTime=""00:00:00"" Storyboard.TargetName=""" + xamlObjectName + @"_SubRect"" Storyboard.TargetProperty=""(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"">
				                <SplineDoubleKeyFrame KeyTime=""00:00:00"" Value=""0""/>
				                <SplineDoubleKeyFrame KeyTime=""00:00:00.2000000"" Value=""-8""/>
			                </DoubleAnimationUsingKeyFrames>
		                </Storyboard>
		                <Storyboard x:Name=""SB" + xamlObjectName + @"_Leave"">
			                <DoubleAnimationUsingKeyFrames BeginTime=""00:00:00"" Storyboard.TargetName=""" + xamlObjectName + @"_SubRect"" Storyboard.TargetProperty=""(FrameworkElement.Height)"">
				                <SplineDoubleKeyFrame KeyTime=""00:00:00"" Value=""30""/>
				                <SplineDoubleKeyFrame KeyTime=""00:00:00.2000000"" Value=""22""/>
			                </DoubleAnimationUsingKeyFrames>
			                <DoubleAnimationUsingKeyFrames BeginTime=""00:00:00"" Storyboard.TargetName=""" + xamlObjectName + @"_SubRect"" Storyboard.TargetProperty=""(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"">
				                <SplineDoubleKeyFrame KeyTime=""00:00:00"" Value=""-8""/>
				                <SplineDoubleKeyFrame KeyTime=""00:00:00.2000000"" Value=""0""/>
			                </DoubleAnimationUsingKeyFrames>
		                </Storyboard>");

Each storyboard has 2 DoubleAnimationUsingKeyFrames, it seems that if I remove 1 DoubleAnimationUsingKeyFrames from each storyboard everything works fine. Yet the same thing works fine when I do it with Blend. Anyone have any idea why this would be happening.
WebcyteDesign is offline
Reply With Quote
View Public Profile Visit WebcyteDesign's homepage!
 
 
Register now for full access!
Old 03-04-2008, 06:44 PM Re: XAML and Javascript
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
If the code you produce with FrontPage worsk and .NET doesn't, my first guess woudl be malformed XML. Try using the XmlDocument class instead of a string builder?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to XAML and Javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29328 seconds with 12 queries