1) my repeat button visual state is a rectangle which Stroke go's from Transparent to Gray when pressed,
this visual state change occurs only once on Pressed,
since this is a repeat button i would like the visual state change to re occur (like a blinking pressed) over and over while pressing , how could i change my visual state to get such an effect
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0" To="Pressed"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Pressed">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle">
<EasingColorKeyFrame KeyTime="0" Value="#FF8F8E8E" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="rectangle" HorizontalAlignment="Stretch" Stroke="Transparent" Fill="Transparent" VerticalAlignment="Stretch" />
</Grid>
</ControlTemplate>
2) One approach i had in mind is to use GoToStateAction with an EventTrigger on Click event (since the Repeat button re fire that event over and over) ,
but i can't seem to place a GoToStateAction directly on the ControlTemplate , and hadn't had much luck placing it under and EventTrigger under the ControlTemplate .
So to Conclude iv'e got 2 issues :
1) A general idea how to solve this issue .
2) My idea requires my to place a GoToStateAction on a ControlTemplate Object , it seems that this can't be done , any ideas how to work around this ?
thanks in advance.