Note that there are some explanatory texts on larger screens.

plurals
  1. USMatheus
    primarykey
    data
    text
    plurals
    1. COThis indeed worked for me. What I basically did was to add the property `SolidBrush IconButton.TapStrokeBrush` to my class then inside the **`ControlTemplate`** I added `Stroke="{TemplateBinding Foreground}"` and for the `Generics.xaml's ContentControl` I made the binding `<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="IconTemplateContainer"><DiscreteObjectKeyFrame KeyTime="0" Value="{Binding TapStrokeBrush, RelativeSource={RelativeSource TemplatedParent}}" /></ObjectAnimationUsingKeyFrames>` inside the `VisualState.Pressed`
      singulars
    2. CO@baueric Thanks a lot for your help. Couldn't make without it :). Would you mind answering the question just like your first comment so I can mark it as the answer and add some remarks?
      singulars
    3. COI believe there wasn't any binding issue as when I tried to use the `TapStrokeBrush` outside of the `VisualState.Pressed` it worked fine. The debug didn't show anything also. It looks like it doesn't work inside the `VisualState`, using `{Binding TapStrokeBrush, RelativeSource={RelativeSource TemplatedParent}}` instead of `{TemplateBinding TapStrokeBrush}` made it work there. I really want to know how, since I read that they are both semantically identical.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload