-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example of how to use use animated icon within a content control that is not the direct (logical) child. #4417
Add an example of how to use use animated icon within a content control that is not the direct (logical) child. #4417
Conversation
…ol that is not the direct (logical) child.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
AutomationProperties.AccessibilityView="Raw" | ||
controls:AnimatedIcon.State="{Binding (controls:AnimatedIcon.State), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add some comments here on how this is working and the wireup involved.
@@ -539,6 +640,18 @@ | |||
</Viewbox> | |||
<TextBlock x:Name="LastTransitionTextBlock"/> | |||
</StackPanel> | |||
|
|||
<StackPanel Background="Gray"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could move the style down into this StackPanel to keep the two together. its hard to know that the implicit button style about is what makes this scenario work.
… add comments to the templates
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
🎉 Handy links: |
AnimatedIcon works by default if a templated content control sets the state property on the direct parent of the animated icon. However sometimes you have a content control and want to make the animated icon a (non-direct) descendent of the control. This adds an example of how you could do that with the current design.