Borderbrush coloranimation fade in and out
11,903
Try to specify:
Storyboard.TargetProperty="BorderBrush.Color"
and either specify:
BorderBrush="any-non-transparent-color"
or in the animation:
From="any-non-transparent-color"
Author by
Ziad
Updated on June 04, 2022Comments
-
Ziad almost 2 years
i have a border , and i change it's borderbrush in the run time. now i need this border to be glowing all the time, whatever the color was.
i tried this but i have problems. any one can help?
<Border Name="ActiveBorder" VerticalAlignment="Stretch" Height="auto" BorderBrush="Transparent" BorderThickness="2" > <Border.Style> <Style TargetType="{x:Type Border}"> <Style.Triggers> <Trigger Property="Visibility" Value="Visible"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <ColorAnimation AutoReverse="True" RepeatBehavior="Forever" Storyboard.TargetProperty="BorderBrush" Duration="00:00:01" To="Transparent"></ColorAnimation> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> </Trigger> </Style.Triggers> </Style> </Border.Style>
-
Ziad over 12 yearsThat worked, Great. thank you. But why can't i use the "Transparent". It will be more powerfull !!!
-
Felice Pollano over 12 yearsbecause if you use Transparent, you will have an animation starting from transparent and moving to tyransparent, so nothing happens.
-
Ziad over 12 yearsAs i'm learning more about animation, i can't bind the color property of the animation. i'm having an exception at run time !! any ideas?
-
Ziad over 12 yearsThis is the new question. Thanks. stackoverflow.com/questions/7240480/…
-
user3260977 almost 8 yearsSetting the StoryBoard.TargetPropertly="BorderBrush.Color" complains that BorderBrush has no Color property. Do you know is that solves the problem?