Reply
XAML and Javascript
Old 03-04-2008, 07:46 AM XAML and Javascript
WebcyteDesign's Avatar
Extreme Talker

Posts: 159
Location: Hamilton
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!
 
When You Register, These Ads Go Away!
     
Old 03-04-2008, 05:44 PM Re: XAML and Javascript
Learning Newbie's Avatar
Moderator

Latest Blog Post:
What Does This Look Like?
Posts: 4,737
Name: John Alexander
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?
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to XAML and Javascript
 

Thread Tools

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

vB 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.10956 seconds with 13 queries