Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

RE: EventTriggers not compiling..

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Wolf Schmidt [MSFT]
Guest


 

RE: EventTriggers not compiling..

Well, unfortunately for you, the "Source" in "SourceUpdated" isn't what you
probably think it is. This is an event to determine whether a databound value
(one-way or two-way) has changed since the binding was first established.
It's not Source, as in Image.Source.
You could get the trigger in question to resolve with
"Binding.SourceUpdated", but you'd be triggering off something that would
never happen, because you don't have any bindings going.
You might want to try triggering off Loaded or Unloaded instead. With
Loaded, you'll have to fight the fact that the first time the image is loaded
with its initial value, the event is raised also, so maybe Unloaded is a
better bet? I'm not exactly sure out of context how your opacity fade is
supposed to match with user action.

"Jason" wrote:

> I'm experiencing another issue with XAML, specifically with trying to get an
> image's Opacity to be modified when it's source has changed (think, fade
> out, fade in). Here's my XAML.. I'm getting an error in that the RoutedEvent
> "Image.SourceUpdated" is not being recognized when I go to compile. Removing
> the "Image." prefix doesn't help.
>
> Any ideas what I'm doing wrong?
>
>
>
> <Style x:Key="ImageStyle" TargetType="{x:Type Image}">
> <Style.Triggers>
> <EventTrigger RoutedEvent="Image.SourceUpdated">
> <EventTrigger.Actions>
> <BeginStoryboard Name="myBeginStoryboard">
> <Storyboard Name="myStoryboard">
> <DoubleAnimation
> Storyboard.TargetName="CurrentImage"
> Storyboard.TargetProperty="(Image.Opacity)"
> From="1" To="0"
> Duration="0:0:1" AutoReverse="True"
> RepeatBehavior="1" />
> </Storyboard>
> </BeginStoryboard>
> </EventTrigger.Actions>
> </EventTrigger>
> </Style.Triggers>
> </Style>
>
>
>
>


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling PS1 script to .com or .exe.. JMinahan PowerShell 11 05-28-2007 10:58 PM
Concept of Template Triggers and EventTriggers HolaMan Avalon 4 04-21-2006 07:11 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51