Hello guys is there any way to run the WPF storyboard using code in VB.NET? If yes how can we do it? And if i am not gonna get answer to this question too then let me know. Thank you!

I guess daniwebers dnt knw about WPF so gonna post it in expression forum. :D

Class MainWindow
Private Sub rectangle_MouseLeftButtonDown(ByVal sender as Object, ByVal e as System.Windows.Input.MouseButtonEventArgs)
Dim sb As Storyboard = DirectCast(FindResource("Storyboard1"), Storyboard)
End Sub
End Class

Finally I got the solution.

Hello friends this post is for those who want to add/remove reference resource dictionary at runtime you can do it as follows

Dim skin = New ResourceDictionary()
skin.Source = New Uri("Green.xaml", UriKind.Relative)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.