Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Page.Storyboards does not work in XamlPad

 
 
Old 01-10-2006   #1 (permalink)
LEU


 
 

Page.Storyboards does not work in XamlPad

Hello,

I am trying to create some simple animation using the XamlPad tool from
Windows SDK:

<Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005">
<Page.Storyboards>
<SetterTimeline TargetName="myButton" Path="(Button.Width)" Value="100">
<DoubleAnimation To="400" Duration="0:0:5" RepeatBehavior="Forever" />
</SetterTimeline>
</Page.Storyboards>
<StackPanel Background="White">
<Button Name="myButton" Width="120">A Button</Button>
</StackPanel>
</Page>

The tool gives me an error: "Unknown tag 'Page.Storyboards' in namespace
'http://schemas.microsoft.com/winfx/avalon/2005'. Note that tag names are
case sensitive. Line 5 Position 4"

I have the latest WinFX Runtime Components (3.0 Beta 2). The example is
taken from MSDN. Is there any new implementation of Page.Storyboards?

Thanx in advance,
Leszek



My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
David Sklar


 
 

Re: Page.Storyboards does not work in XamlPad

The syntax you're working with is now obsolete; things are quite
different now.

The XAML shown below performs the kind of animation you want, and it
*may* work with the release you are using. If it doesn't,
I recommend moving to the November CTP so you can start working with
something that is 99% what WinFX will look like for its first release.

This XAML is from the NovCTP SDK, but of course it did not work "right
out of the box" and I made repairs. (The SDK is still a little behind,
but it's getting much better with each release!)

Enjoy!




<!-- StoryboardExample.xaml
Uses storyboards to animate properties. -->
<Canvas
xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"
>


<Border Background="White">
<StackPanel Margin="30" HorizontalAlignment="Left" MinWidth="500">

<TextBlock>Storyboard Animation Example</TextBlock>

<!-- The width of this button is animated. -->
<Button Name="myWidthAnimatedButton"
Height="30" Width="200" HorizontalAlignment="Left">
A Button
<Button.Triggers>

<!-- Animates the width of the first button
from 200 to 300. -->
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="myWidthAnimatedButton"
Storyboard.TargetProperty="(Button.Width)"
From="200" To="300" Duration="0:0:3" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>

<!-- The color of the brush used to paint this button is
animated. -->
<Button Height="30" Width="200"
HorizontalAlignment="Left">Another Button
<Button.Background>
<SolidColorBrush x:Name="myAnimatedBrush" Color="Blue" />
</Button.Background>
<Button.Triggers>

<!-- Animates the color of the brush used to paint
the second button from red to blue . -->
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<ColorAnimation
Storyboard.TargetName="myAnimatedBrush"
Storyboard.TargetProperty="(SolidColorBrush.Color)"
From="Red" To="Blue" Duration="0:0:7" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
</StackPanel>
</Border>
</Canvas>





LEU wrote:
> Hello,
>
> I am trying to create some simple animation using the XamlPad tool from
> Windows SDK:
>
> <Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
> xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005">
> <Page.Storyboards>
> <SetterTimeline TargetName="myButton" Path="(Button.Width)" Value="100">
> <DoubleAnimation To="400" Duration="0:0:5" RepeatBehavior="Forever" />
> </SetterTimeline>
> </Page.Storyboards>
> <StackPanel Background="White">
> <Button Name="myButton" Width="120">A Button</Button>
> </StackPanel>
> </Page>
>
> The tool gives me an error: "Unknown tag 'Page.Storyboards' in namespace
> 'http://schemas.microsoft.com/winfx/avalon/2005'. Note that tag names are
> case sensitive. Line 5 Position 4"
>
> I have the latest WinFX Runtime Components (3.0 Beta 2). The example is
> taken from MSDN. Is there any new implementation of Page.Storyboards?
>
> Thanx in advance,
> Leszek


My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
LEU


 
 

Re: Page.Storyboards does not work in XamlPad

Thanks a lot! It works now.

BTW I tested the code on the November SDK. The code was taken from MSDN and
it is significantly different from what you provided. It's really confusing
because it seems old and new syntax is somehow mixed, and none of them works
in 100%. How have you figured out the correct syntax?

Leszek

"David Sklar" <dfsklar@gmail.com> wrote in message
news:1134786406.989347.156440@g44g2000cwa.googlegroups.com...
> The syntax you're working with is now obsolete; things are quite
> different now.
>
> The XAML shown below performs the kind of animation you want, and it
> *may* work with the release you are using. If it doesn't,
> I recommend moving to the November CTP so you can start working with
> something that is 99% what WinFX will look like for its first release.
>
> This XAML is from the NovCTP SDK, but of course it did not work "right
> out of the box" and I made repairs. (The SDK is still a little behind,
> but it's getting much better with each release!)
>
> Enjoy!
>
>
>
>
> <!-- StoryboardExample.xaml
> Uses storyboards to animate properties. -->
> <Canvas
> xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
> xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"
>>

>
> <Border Background="White">
> <StackPanel Margin="30" HorizontalAlignment="Left" MinWidth="500">
>
> <TextBlock>Storyboard Animation Example</TextBlock>
>
> <!-- The width of this button is animated. -->
> <Button Name="myWidthAnimatedButton"
> Height="30" Width="200" HorizontalAlignment="Left">
> A Button
> <Button.Triggers>
>
> <!-- Animates the width of the first button
> from 200 to 300. -->
> <EventTrigger RoutedEvent="Button.Click">
> <BeginStoryboard>
> <Storyboard>
> <DoubleAnimation
> Storyboard.TargetName="myWidthAnimatedButton"
> Storyboard.TargetProperty="(Button.Width)"
> From="200" To="300" Duration="0:0:3" />
> </Storyboard>
> </BeginStoryboard>
> </EventTrigger>
> </Button.Triggers>
> </Button>
>
> <!-- The color of the brush used to paint this button is
> animated. -->
> <Button Height="30" Width="200"
> HorizontalAlignment="Left">Another Button
> <Button.Background>
> <SolidColorBrush x:Name="myAnimatedBrush" Color="Blue" />
> </Button.Background>
> <Button.Triggers>
>
> <!-- Animates the color of the brush used to paint
> the second button from red to blue . -->
> <EventTrigger RoutedEvent="Button.Click">
> <BeginStoryboard>
> <Storyboard>
> <ColorAnimation
> Storyboard.TargetName="myAnimatedBrush"
> Storyboard.TargetProperty="(SolidColorBrush.Color)"
> From="Red" To="Blue" Duration="0:0:7" />
> </Storyboard>
> </BeginStoryboard>
> </EventTrigger>
> </Button.Triggers>
> </Button>
> </StackPanel>
> </Border>
> </Canvas>
>
>
>
>
>
> LEU wrote:
>> Hello,
>>
>> I am trying to create some simple animation using the XamlPad tool from
>> Windows SDK:
>>
>> <Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
>> xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005">
>> <Page.Storyboards>
>> <SetterTimeline TargetName="myButton" Path="(Button.Width)"
>> Value="100">
>> <DoubleAnimation To="400" Duration="0:0:5" RepeatBehavior="Forever"
>> />
>> </SetterTimeline>
>> </Page.Storyboards>
>> <StackPanel Background="White">
>> <Button Name="myButton" Width="120">A Button</Button>
>> </StackPanel>
>> </Page>
>>
>> The tool gives me an error: "Unknown tag 'Page.Storyboards' in namespace
>> 'http://schemas.microsoft.com/winfx/avalon/2005'. Note that tag names are
>> case sensitive. Line 5 Position 4"
>>
>> I have the latest WinFX Runtime Components (3.0 Beta 2). The example is
>> taken from MSDN. Is there any new implementation of Page.Storyboards?
>>
>> Thanx in advance,
>> Leszek

>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Re: IE8 Send Page/Link Commands Do Not Work Live Mail
Web page designer software that will work with Vista 64 bit? Vista General
in-page links from Windows Mail don't work Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46