![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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 Specs![]() |
![]() |
| 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 |