Animate opacity of ImageBrush within a Rectangle in XAML -


I have a rectangle that is trying to fade on the load by increasing the ambiguity from 0 to 100.

What do I have here:

  & lt; Rectangle Horizontal Alignment = "Left" width = "200" stroke = "# FF 2000000" StrokeTextness = "0" Fill = "{DynamicResource MyImageBrush}" & gt; & Lt; Rectangle.Resources & gt; & Lt; ImageBrush x: name = "imagebrush" x: key = "mimejibish" imescoros = "tower.jpg" stretch = "uniformity" opism = "0" & ​​gt; & Lt; / ImageBrush & gt; & Lt; /Rectangle.Resources> & Lt; Rectangle.Triggers & gt; & Lt; EventTrigor Routing Avent = "Rectangle Loaded" & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard & gt; & Lt; Double animation x: name = "fadein" storyboard. Target name = "imagebrish" storyboard. Target = property from "opacity" = "0" = "100" = "0: 0: 5" /> & Lt; / Storyboard & gt; & Lt; / BeginStoryboard & gt; & Lt; / EventTrigger & gt; & Lt; /Rectangle.Triggers> & Lt; / Rectangles & gt;  

The error that throws is:

'imgbush' name 'system. Windows. Shape. Reference 'can not be found within the purview of the name.

(ImgBrush specified in Storyboard.TargetName)

What can I do to solve it?

Instead of trying to enliven the whole image, rely on it by animate the opacity of the entire rectangle Done

  & lt; Rectangle name = "leftrectengel" opacity = "0" horizontal alignment = "left" width = "200" stroke = "# FF 2000000" strokeTextness = "0" Fill = "{DynamicResource MyImageBrush}" & gt; & Lt; Rectangle.Resources & gt; & Lt; ImageBrush x: name = "imagebrush" x: key = "mimejbbr" imesource = "tower.jpg" stretch = "uniform tofil" opism = "100" & gt; & Lt; / ImageBrush & gt; & Lt; /Rectangle.Resources> & Lt; Rectangle.Triggers & gt; & Lt; EventTrigor Routing Avent = "Rectangle Loaded" & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard & gt; & Lt; Double animation x: name = "fadein" storyboard. Target name = "leftrackengel" storyboard Target = property from "opacity" = "0" = "100" = "0: 4: 5" /> & Lt; / Storyboard & gt; & Lt; / BeginStoryboard & gt; & Lt; / EventTrigger & gt; & Lt; /Rectangle.Triggers> & Lt; / Rectangles & gt;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -