项目运行时无动作 [英] No movement at project run
问题描述
这是我使用Expression Blend 3的第一天。我在使用它时遇到了困难。我找不到"手册"为此。
我的系统是Intel Quadcore,4GB Ram和Windows 7.
我成功完成了以下项目。
= ====== =======
< UserControl
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x =" http://schemas.microsoft.com/winfx/2006/xaml"
x:Class =" clocktower.MainPage"
Width =" 640"高度="480">
< UserControl.Resources>
< Storyboard x:Name =" Storyboard1">
< DoubleAnimationUsingKeyFrames BeginTime =" 00:00: 00 QUOT; Storyboard.TargetName = QUOT;正文块" Storyboard.TargetProperty ="(UIElement.RenderTransform)。(TransformGroup.Children)[3]。(TranslateTransform.X)">
< EasingDoubleKeyFrame KeyTime =" 00:00:00"值=" 0">
< EasingDoubleKeyFrame KeyTime =" 00:00:04.8000000"值=" 139"< EasingDoubleKeyFrame KeyTime =" 00:00:09.3000000"值=" -12" />
< / DoubleAnimationUsingKeyFrames>
< DoubleAnimationUsingKeyFrames BeginTime =" 00:00:00" Storyboard.TargetName = QUOT;正文块" Storyboard.TargetProperty ="(UIElement.RenderTransform)。(TransformGroup.Children)[3]。(TranslateTransform.Y)">
< EasingDoubleKeyFrame KeyTime =" 00:00:00"值=" 0">
< EasingDoubleKeyFrame KeyTime =" 00:00:04.8000000"值=" 84"< EasingDoubleKeyFrame KeyTime =" 00:00:09.3000000"值=" 211" />
< / DoubleAnimationUsingKeyFrames>
< / Storyboard>
< /UserControl.Resources>
<网格x :名称= QUOT; LayoutRoot" Background =" White">
< TextBlock x:Name =" textBlock"高度= QUOT; 85"余量= QUOT; 192,109,275,0" VerticalAlignment = QUOT;陀螺" Text =" Test Text" TextWrapping = QUOT;包覆与QUOT; RenderTransformOrigin =" 0.5,0.5">
< TextBlock.RenderTransform>
< TransformGroup>
< ScaleTransform />
< SkewTransform />
< RotateTransform />
< TranslateTransform />
< / TransformGroup>
< /TextBlock.RenderTransform>
< / TextBlock>
< / Grid>
< / UserControl>
= ==============
我可以建立一个项目,但是当我运行项目时用F5键,文字根本没动。我该如何解决这个问题?
谢谢。
Hi, this is my first day with Expression Blend 3. I'm having difficulties in using it. I couldn't find a "manual" for this.
My system is Intel Quadcore, 4GB Ram, and Windows 7.
I managed to make the following project.
=============
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="clocktower.MainPage"
Width="640" Height="480">
<UserControl.Resources>
<Storyboard x:Name="Storyboard1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:04.8000000" Value="139"/>
<EasingDoubleKeyFrame KeyTime="00:00:09.3000000" Value="-12"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:04.8000000" Value="84"/>
<EasingDoubleKeyFrame KeyTime="00:00:09.3000000" Value="211"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock x:Name="textBlock" Height="85" Margin="192,109,275,0" VerticalAlignment="Top" Text="Test Text" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</UserControl>
==============
I could build a project, but when I ran the project with F5 key, the text didn't move at all. How can I fix this problem?
Thanks.
推荐答案
你确实创建了一个故事板,但从未将其添加到玩。请按照以下步骤告诉我们是否适合您。
1。拖放"ControlStoryboardAction" LayoutRoot上资产窗格的行为
2。选择"ControlStoryboardAction";在对象和时间线面板中3。在"属性"窗格中,在"故事板"中设置要播放的故事板。下降
4。设置"事件名称"财产到已装载的5。 F5
这将在加载LayoutRoot时播放故事板。此外,你可以在不使用行为的情况下在代码隐藏中做同样的事情。
HTH
问候,
Navit Saxena
Hi,
You did create a Storyboard but never enbaled it to play. Follow these steps and let us know if it works for you.
1. Drag and drop "ControlStoryboardAction" behavior from Asset pane on the LayoutRoot
2. Select "ControlStoryboardAction" in Object and Timeline panel
3. In Properties pane, set the storyboard you want to play in the "Storyboard" drop down
4. Set the "Eventname" property to Loaded
5. F5
This will play the storyboard when LayoutRoot is loaded. Also, you can do the same thing in code-behind without using Behaviors.
HTH
Regards,
Navit Saxena
这篇关于项目运行时无动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!