Skip to content

How to add animation using DSL style without Style? #343

Closed Answered by Zolomon
Zolomon asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks! After a couple of hours late this early morning I managed to figure out how to achieve what I wanted:

// Example modified from the Examples/TodoApp
Button.styles (
    let styles = Styles()
    let style = Style(fun x -> x.OfType<Button>().Template().OfType<ContentPresenter>())
    let setter = Setter(ContentPresenter.CornerRadiusProperty, CornerRadius(10.0))
    style.Setters.Add setter
    let animation = Animation()
                            .WithDuration(1.0)
                            .WithEasing(CubicEaseIn())
                            .WithFillMode(FillMode.Forward)
                            .WithKeyFrames [
                                KeyFrame()

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@JaggerJo
Comment options

Answer selected by Zolomon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants