locked
Use a javascript which generates gradients for me in C# to draw over a element RRS feed

  • Question

  • The javascript has functions in which the gradient changes according to the time. It was built to work a desktop website but I want to utilize it so that I can use its functions in my windows store application.
    I'm using C# so I need a way to do this. The javascript responds with rgb values which I assume are usable.

    Thanks
    Friday, January 17, 2014 2:18 AM

Answers

  • You aren't going to be able to run a javascript function in a C# unless it's in a webview.  However, if you've just looking to change the value of RGB over time, you would want to use a DoubleAnimation inside a Storyboard.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by blackasninja Saturday, January 18, 2014 2:12 AM
    Friday, January 17, 2014 2:25 PM
    Moderator

All replies

  • You aren't going to be able to run a javascript function in a C# unless it's in a webview.  However, if you've just looking to change the value of RGB over time, you would want to use a DoubleAnimation inside a Storyboard.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by blackasninja Saturday, January 18, 2014 2:12 AM
    Friday, January 17, 2014 2:25 PM
    Moderator
  • Ok thanks for the answer. 
    I guessed I wouldnt be able to do it but just incase someone had managed to do I asked. 

    Thanks again for answer
    Saturday, January 18, 2014 2:13 AM