![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Compiling error | .NET General | |||
| compiling multiple projects into single exe | .NET General | |||
| Compiling PS1 script to .com or .exe.. | PowerShell | |||